Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / tabpagecollectioneditor.cs / 1 / tabpagecollectioneditor.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope="member", Target="System.Windows.Forms.Design.TabPageCollectionEditor..ctor()")] namespace System.Windows.Forms.Design { using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Windows.Forms; using System.Data; using System.Drawing.Design; using System.Diagnostics; using System.Design; using System.Windows.Forms.Layout; ////// Main class for collection editor for TabPageCollection. Allows a single level of ToolStripItem children to be designed. /// internal class TabPageCollectionEditor : CollectionEditor { ////// Default contstructor. /// public TabPageCollectionEditor() : base(typeof(TabControl.TabPageCollection)) { } ////// /// protected override object SetItems(object editValue, object[] value) { TabControl tc = this.Context.Instance as TabControl; if (tc != null) { tc.SuspendLayout(); } // Set the UseVisualStyleBackColor for all the tabPages added through the collectionEditor. foreach (object tab in value) { TabPage page = tab as TabPage; if (page != null) { PropertyDescriptor styleProp = TypeDescriptor.GetProperties(page)["UseVisualStyleBackColor"]; if (styleProp != null && styleProp.PropertyType == typeof(bool) && !styleProp.IsReadOnly && styleProp.IsBrowsable) { styleProp.SetValue(page, true); } } } object retValue = base.SetItems(editValue, value); if (tc != null) { tc.ResumeLayout(); } return retValue; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved./// Sets /// the specified collection to have the specified array of items. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Storyboard.cs
- DesignerActionPanel.cs
- XPathItem.cs
- ByteArrayHelperWithString.cs
- ListViewGroupConverter.cs
- StringReader.cs
- MetadataArtifactLoaderCompositeResource.cs
- PnrpPeerResolverElement.cs
- BufferedWebEventProvider.cs
- ApplicationServicesHostFactory.cs
- SubclassTypeValidatorAttribute.cs
- EntityDataSourceWizardForm.cs
- KeyFrames.cs
- Crc32.cs
- ColorTransform.cs
- HostingEnvironmentException.cs
- DesignerActionHeaderItem.cs
- ListViewCommandEventArgs.cs
- SolidColorBrush.cs
- CuspData.cs
- DLinqColumnProvider.cs
- BaseCollection.cs
- _HTTPDateParse.cs
- Form.cs
- ChangeNode.cs
- HyperlinkAutomationPeer.cs
- ApplicationInfo.cs
- Substitution.cs
- XmlSecureResolver.cs
- SqlMethodAttribute.cs
- DataTablePropertyDescriptor.cs
- TagNameToTypeMapper.cs
- SessionStateUtil.cs
- CapabilitiesSection.cs
- HostingMessageProperty.cs
- CodeAttributeDeclaration.cs
- IImplicitResourceProvider.cs
- EncryptedPackageFilter.cs
- BitmapEffectRenderDataResource.cs
- IisTraceWebEventProvider.cs
- SerializationFieldInfo.cs
- DeferredReference.cs
- CursorEditor.cs
- Pkcs7Recipient.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- HostAdapter.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- AuthorizationContext.cs
- SecurityManager.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- DataRecordInfo.cs
- ContractAdapter.cs
- PlainXmlSerializer.cs
- SimpleWorkerRequest.cs
- AppDomainUnloadedException.cs
- ExpressionContext.cs
- VectorKeyFrameCollection.cs
- FixUpCollection.cs
- CounterSample.cs
- SystemIPInterfaceProperties.cs
- SingleObjectCollection.cs
- VoiceInfo.cs
- SystemDiagnosticsSection.cs
- MenuScrollingVisibilityConverter.cs
- _NegotiateClient.cs
- PrivilegedConfigurationManager.cs
- NameValueConfigurationCollection.cs
- EventManager.cs
- HitTestWithGeometryDrawingContextWalker.cs
- Site.cs
- ArraySortHelper.cs
- DataSourceConverter.cs
- Ray3DHitTestResult.cs
- ClientSettingsStore.cs
- SystemIcmpV6Statistics.cs
- WebControl.cs
- TableCellAutomationPeer.cs
- MatrixStack.cs
- TrackBar.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- TextTreeUndo.cs
- DataError.cs
- ReadOnlyAttribute.cs
- AggregatePushdown.cs
- SurrogateSelector.cs
- DbDataAdapter.cs
- EntityContainerEmitter.cs
- InstalledVoice.cs
- AsymmetricSignatureFormatter.cs
- StorageMappingItemCollection.cs
- ExpressionEditor.cs
- ChildChangedEventArgs.cs
- ZipIOExtraFieldPaddingElement.cs
- Point3D.cs
- StrongNameIdentityPermission.cs
- ItemCheckedEvent.cs
- RowsCopiedEventArgs.cs
- StaticSiteMapProvider.cs
- LongValidator.cs
- MonikerSyntaxException.cs