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
- SafeTokenHandle.cs
- ContentFilePart.cs
- TextTreeTextElementNode.cs
- HandlerBase.cs
- SvcMapFileSerializer.cs
- StylusShape.cs
- Transform3DGroup.cs
- DecoderFallback.cs
- FileLoadException.cs
- TimeSpanValidatorAttribute.cs
- CqlBlock.cs
- ContractMapping.cs
- ComPlusAuthorization.cs
- SaveFileDialog.cs
- XamlSerializationHelper.cs
- SiteMapProvider.cs
- ListSortDescriptionCollection.cs
- SqlWorkflowPersistenceService.cs
- IssuanceLicense.cs
- StylusSystemGestureEventArgs.cs
- Accessible.cs
- ConfigurationSectionGroupCollection.cs
- DesignerWidgets.cs
- DatatypeImplementation.cs
- ElementProxy.cs
- ThreadStaticAttribute.cs
- Int32RectValueSerializer.cs
- OuterGlowBitmapEffect.cs
- HGlobalSafeHandle.cs
- StructuralCache.cs
- WorkflowQueue.cs
- SQLInt16Storage.cs
- LogRecordSequence.cs
- KeyValueSerializer.cs
- ParameterCollection.cs
- DataSourceXmlSerializationAttribute.cs
- PathNode.cs
- ChangeTracker.cs
- EmissiveMaterial.cs
- WsdlInspector.cs
- ArraySet.cs
- TextTabProperties.cs
- DesignerResources.cs
- ProfessionalColorTable.cs
- DataGridColumnHeaderAutomationPeer.cs
- DesignerCategoryAttribute.cs
- _Win32.cs
- DataGridItem.cs
- BaseConfigurationRecord.cs
- DBCommandBuilder.cs
- SiteMapDataSourceView.cs
- ToolBarOverflowPanel.cs
- ComAdminInterfaces.cs
- SqlMultiplexer.cs
- ConvertEvent.cs
- ClientProxyGenerator.cs
- WebEvents.cs
- SHA256.cs
- FlowDocumentReader.cs
- XPathBinder.cs
- X509SecurityTokenProvider.cs
- SystemIcons.cs
- Identifier.cs
- NamedPipeTransportElement.cs
- FocusWithinProperty.cs
- ContextMenuStrip.cs
- Sql8ExpressionRewriter.cs
- LabelAutomationPeer.cs
- ToolStripRenderEventArgs.cs
- RectangleHotSpot.cs
- CuspData.cs
- MenuAutomationPeer.cs
- StringFreezingAttribute.cs
- CacheEntry.cs
- ChannelManager.cs
- XmlMapping.cs
- StylusPointPropertyInfo.cs
- EventlogProvider.cs
- SharedStatics.cs
- RestClientProxyHandler.cs
- basemetadatamappingvisitor.cs
- InputScope.cs
- GreenMethods.cs
- FileLevelControlBuilderAttribute.cs
- TypeBinaryExpression.cs
- TypeElement.cs
- TextCollapsingProperties.cs
- DbException.cs
- ParserStreamGeometryContext.cs
- ObjectDisposedException.cs
- LocatorPart.cs
- Attributes.cs
- RadioButtonFlatAdapter.cs
- AssemblyAssociatedContentFileAttribute.cs
- OutputScopeManager.cs
- RedirectionProxy.cs
- Attributes.cs
- StringTraceRecord.cs
- ProcessDesigner.cs
- String.cs