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
- TextProperties.cs
- MetadataItemCollectionFactory.cs
- TextTreeDeleteContentUndoUnit.cs
- SystemMulticastIPAddressInformation.cs
- Rule.cs
- X509SecurityTokenProvider.cs
- AttributeCollection.cs
- Baml2006KeyRecord.cs
- DataSourceSelectArguments.cs
- KnownColorTable.cs
- TagPrefixCollection.cs
- LoadedEvent.cs
- TextRunCacheImp.cs
- XPathDocumentBuilder.cs
- ReaderOutput.cs
- SQLUtility.cs
- BasicViewGenerator.cs
- Vector3DCollectionConverter.cs
- RegexCharClass.cs
- ValuePattern.cs
- ServicePointManager.cs
- DataGridRow.cs
- AnnotationObservableCollection.cs
- BamlTreeNode.cs
- MediaPlayer.cs
- BamlBinaryReader.cs
- JsonServiceDocumentSerializer.cs
- FrugalList.cs
- LoginName.cs
- MergeLocalizationDirectives.cs
- MenuItemCollectionEditorDialog.cs
- DataProviderNameConverter.cs
- Inflater.cs
- JsonReader.cs
- ConstraintManager.cs
- GiveFeedbackEventArgs.cs
- DataTableMappingCollection.cs
- DataFormats.cs
- DataGridViewImageCell.cs
- SerializerDescriptor.cs
- RelatedCurrencyManager.cs
- EditorPart.cs
- RegexCode.cs
- IpcPort.cs
- PolyBezierSegment.cs
- TemplatePagerField.cs
- ProfileSettingsCollection.cs
- SerializableAuthorizationContext.cs
- WebExceptionStatus.cs
- TrackBarRenderer.cs
- ProfessionalColorTable.cs
- HtmlEmptyTagControlBuilder.cs
- WindowsGraphicsCacheManager.cs
- ValidatingCollection.cs
- SafeHGlobalHandleCritical.cs
- CompatibleComparer.cs
- XmlDigitalSignatureProcessor.cs
- XmlUrlResolver.cs
- EqualityComparer.cs
- AutomationProperty.cs
- Console.cs
- MiniAssembly.cs
- CodeArrayIndexerExpression.cs
- ChainOfResponsibility.cs
- formatstringdialog.cs
- SpnEndpointIdentity.cs
- ADMembershipUser.cs
- PrefixQName.cs
- InputEventArgs.cs
- ArrayTypeMismatchException.cs
- DelayedRegex.cs
- Mouse.cs
- MetadataItemEmitter.cs
- KoreanCalendar.cs
- InvalidAsynchronousStateException.cs
- ValidationRule.cs
- OTFRasterizer.cs
- FileSystemWatcher.cs
- ActiveDocumentEvent.cs
- PlaceHolder.cs
- UserPersonalizationStateInfo.cs
- UnescapedXmlDiagnosticData.cs
- oledbmetadatacolumnnames.cs
- TextTreeInsertUndoUnit.cs
- InvalidOleVariantTypeException.cs
- HuffmanTree.cs
- ElementMarkupObject.cs
- AQNBuilder.cs
- XhtmlBasicCommandAdapter.cs
- MetadataArtifactLoaderCompositeResource.cs
- OutputCacheSection.cs
- ProfilePropertyMetadata.cs
- _ConnectionGroup.cs
- ElementProxy.cs
- Stylesheet.cs
- UnknownWrapper.cs
- HttpFormatExtensions.cs
- Int32Rect.cs
- ProxyHwnd.cs
- ChangeNode.cs