Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / WinForms / Managed / System / WinForms / PropertyGridInternal / PropertiesTab.cs / 1 / PropertiesTab.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms.PropertyGridInternal { using System.Runtime.InteropServices; using System.Diagnostics; using System; using System.ComponentModel.Design; using System.ComponentModel; using System.Windows.Forms.ComponentModel; using System.Windows.Forms.Design; using System.Collections; using Microsoft.Win32; ////// /// [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class PropertiesTab : PropertyTab { ///[To be supplied.] ////// /// public override string TabName { get { return SR.GetString(SR.PBRSToolTipProperties); } } ///[To be supplied.] ////// /// public override string HelpKeyword { get { return "vs.properties"; // do not localize. } } ///[To be supplied.] ////// /// public override PropertyDescriptor GetDefaultProperty(object obj) { PropertyDescriptor def = base.GetDefaultProperty(obj); if (def == null) { PropertyDescriptorCollection props = GetProperties(obj); if (props != null) { for (int i = 0; i < props.Count; i++) { if ("Name".Equals(props[i].Name)) { def = props[i]; break; } } } } return def; } ///[To be supplied.] ////// /// public override PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes) { return GetProperties(null, component, attributes); } ///[To be supplied.] ////// /// public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes) { if (attributes == null) { attributes = new Attribute[]{BrowsableAttribute.Yes}; } if (context == null) { return TypeDescriptor.GetProperties(component, attributes); } else { TypeConverter tc = (context.PropertyDescriptor == null ? TypeDescriptor.GetConverter(component) : context.PropertyDescriptor.Converter); if (tc == null || !tc.GetPropertiesSupported(context)) { return TypeDescriptor.GetProperties(component, attributes); } else { return tc.GetProperties(context, component, attributes); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms.PropertyGridInternal { using System.Runtime.InteropServices; using System.Diagnostics; using System; using System.ComponentModel.Design; using System.ComponentModel; using System.Windows.Forms.ComponentModel; using System.Windows.Forms.Design; using System.Collections; using Microsoft.Win32; ////// /// [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name="FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class PropertiesTab : PropertyTab { ///[To be supplied.] ////// /// public override string TabName { get { return SR.GetString(SR.PBRSToolTipProperties); } } ///[To be supplied.] ////// /// public override string HelpKeyword { get { return "vs.properties"; // do not localize. } } ///[To be supplied.] ////// /// public override PropertyDescriptor GetDefaultProperty(object obj) { PropertyDescriptor def = base.GetDefaultProperty(obj); if (def == null) { PropertyDescriptorCollection props = GetProperties(obj); if (props != null) { for (int i = 0; i < props.Count; i++) { if ("Name".Equals(props[i].Name)) { def = props[i]; break; } } } } return def; } ///[To be supplied.] ////// /// public override PropertyDescriptorCollection GetProperties(object component, Attribute[] attributes) { return GetProperties(null, component, attributes); } ///[To be supplied.] ////// /// public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object component, Attribute[] attributes) { if (attributes == null) { attributes = new Attribute[]{BrowsableAttribute.Yes}; } if (context == null) { return TypeDescriptor.GetProperties(component, attributes); } else { TypeConverter tc = (context.PropertyDescriptor == null ? TypeDescriptor.GetConverter(component) : context.PropertyDescriptor.Converter); if (tc == null || !tc.GetPropertiesSupported(context)) { return TypeDescriptor.GetProperties(component, attributes); } else { return tc.GetProperties(context, component, attributes); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QueryActivatableWorkflowsCommand.cs
- Utils.cs
- LayoutTable.cs
- DataContractSet.cs
- ContentPlaceHolderDesigner.cs
- AdapterDictionary.cs
- DataGridViewRow.cs
- PhysicalOps.cs
- GraphicsContainer.cs
- ControlParser.cs
- ConfigXmlElement.cs
- LineBreakRecord.cs
- NonBatchDirectoryCompiler.cs
- CompileLiteralTextParser.cs
- altserialization.cs
- EditorZone.cs
- ArglessEventHandlerProxy.cs
- CodeTypeReference.cs
- ButtonBase.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- XmlSchemaCollection.cs
- SettingsContext.cs
- ControllableStoryboardAction.cs
- ValueUtilsSmi.cs
- ReadWriteObjectLock.cs
- DesignTimeVisibleAttribute.cs
- BitmapImage.cs
- DataTransferEventArgs.cs
- DateTimeFormatInfo.cs
- NameTable.cs
- FlagsAttribute.cs
- PagesChangedEventArgs.cs
- UDPClient.cs
- RichTextBox.cs
- EnumType.cs
- InnerItemCollectionView.cs
- IisTraceListener.cs
- NamespaceImport.cs
- DocumentCollection.cs
- MetadataCache.cs
- BaseAddressPrefixFilterElementCollection.cs
- RadioButtonList.cs
- OledbConnectionStringbuilder.cs
- TextParagraph.cs
- MimeTypeMapper.cs
- DependencyObjectProvider.cs
- AnnotationComponentManager.cs
- HttpCapabilitiesBase.cs
- InstanceKeyView.cs
- ReadingWritingEntityEventArgs.cs
- CodeComment.cs
- LowerCaseStringConverter.cs
- XmlSchemaDatatype.cs
- StyleSheetComponentEditor.cs
- HttpApplicationStateBase.cs
- BitmapEffectInputConnector.cs
- EventBuilder.cs
- SpeechRecognitionEngine.cs
- DocumentPaginator.cs
- DbConnectionPoolGroup.cs
- CommandEventArgs.cs
- Calendar.cs
- ReservationCollection.cs
- BufferModesCollection.cs
- Interlocked.cs
- basenumberconverter.cs
- BinaryNode.cs
- EntryIndex.cs
- DelegatingMessage.cs
- DtrList.cs
- IChannel.cs
- QueryContinueDragEventArgs.cs
- XmlFormatExtensionAttribute.cs
- ApplicationProxyInternal.cs
- EntityUtil.cs
- NonBatchDirectoryCompiler.cs
- RoutingUtilities.cs
- XmlSignatureProperties.cs
- DbConnectionPoolGroupProviderInfo.cs
- GrammarBuilderBase.cs
- DbMetaDataColumnNames.cs
- documentsequencetextview.cs
- TreeNodeBindingCollection.cs
- HwndMouseInputProvider.cs
- DataGridClipboardCellContent.cs
- SqlCrossApplyToCrossJoin.cs
- BamlLocalizabilityResolver.cs
- CompositeCollectionView.cs
- DbConnectionPoolIdentity.cs
- ListBox.cs
- VerificationException.cs
- ArrayList.cs
- Resources.Designer.cs
- FormatterServices.cs
- TextBoxAutomationPeer.cs
- HashSetEqualityComparer.cs
- SmiEventSink.cs
- __Filters.cs
- IFlowDocumentViewer.cs
- XPathDocumentNavigator.cs