Code:
/ FX-1434 / FX-1434 / 1.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
- FeatureSupport.cs
- PanelContainerDesigner.cs
- ContextMenuStrip.cs
- Set.cs
- ElementNotAvailableException.cs
- Span.cs
- ReflectTypeDescriptionProvider.cs
- SecurityTokenSpecification.cs
- DispatchChannelSink.cs
- DeploymentExceptionMapper.cs
- OuterGlowBitmapEffect.cs
- Site.cs
- TailPinnedEventArgs.cs
- DocumentPaginator.cs
- FastPropertyAccessor.cs
- Nullable.cs
- LambdaReference.cs
- HtmlInputHidden.cs
- DataView.cs
- HyperLinkColumn.cs
- StrokeNodeOperations2.cs
- HatchBrush.cs
- Helpers.cs
- ThreadExceptionEvent.cs
- InvalidPropValue.cs
- Literal.cs
- ThreadInterruptedException.cs
- ApplicationProxyInternal.cs
- DbConnectionPoolGroup.cs
- PrivacyNoticeElement.cs
- DesignerDataParameter.cs
- TextElementEnumerator.cs
- Group.cs
- DesignerSerializerAttribute.cs
- CheckoutException.cs
- PeerService.cs
- SqlConnectionManager.cs
- Hex.cs
- HttpDebugHandler.cs
- HashSet.cs
- TabRenderer.cs
- SqlWebEventProvider.cs
- MemberProjectionIndex.cs
- DocumentPageViewAutomationPeer.cs
- EmbeddedMailObjectsCollection.cs
- CompositeScriptReference.cs
- CodeValidator.cs
- XmlSchemaAll.cs
- pingexception.cs
- InternalResources.cs
- EdmItemCollection.cs
- NavigationProperty.cs
- Menu.cs
- TextPointer.cs
- HtmlTableCellCollection.cs
- TreeIterators.cs
- FixUp.cs
- AnimationLayer.cs
- Rectangle.cs
- ToolTipAutomationPeer.cs
- DataServiceQuery.cs
- ListSortDescriptionCollection.cs
- AuthenticationSection.cs
- GridView.cs
- BinaryObjectInfo.cs
- DisposableCollectionWrapper.cs
- dtdvalidator.cs
- FormParameter.cs
- StyleTypedPropertyAttribute.cs
- MasterPageBuildProvider.cs
- ComponentChangedEvent.cs
- SocketElement.cs
- AudienceUriMode.cs
- SessionState.cs
- SctClaimDictionary.cs
- Point3DValueSerializer.cs
- ContentDisposition.cs
- NamedServiceModelExtensionCollectionElement.cs
- StrongNameSignatureInformation.cs
- AdornedElementPlaceholder.cs
- UnmanagedMemoryStreamWrapper.cs
- DateTimeUtil.cs
- SqlResolver.cs
- HtmlControlPersistable.cs
- OutOfProcStateClientManager.cs
- QueryRewriter.cs
- figurelengthconverter.cs
- ScrollProperties.cs
- XmlImplementation.cs
- Mapping.cs
- QilBinary.cs
- MessageQueueConverter.cs
- TypeForwardedToAttribute.cs
- RelativeSource.cs
- VirtualPath.cs
- IList.cs
- Int32Animation.cs
- ValidatingReaderNodeData.cs
- KeyPressEvent.cs
- FieldToken.cs