Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / PropertyGridInternal / PropertiesTab.cs / 1305376 / 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
- TypeSystem.cs
- DataGridViewAdvancedBorderStyle.cs
- CodeGeneratorOptions.cs
- XmlSerializerAssemblyAttribute.cs
- _ConnectOverlappedAsyncResult.cs
- HtmlButton.cs
- ScrollBarAutomationPeer.cs
- hebrewshape.cs
- WSSecurityPolicy11.cs
- SqlDataSourceConfigureFilterForm.cs
- AsyncContentLoadedEventArgs.cs
- KeyGesture.cs
- TabItem.cs
- BrowserCapabilitiesFactoryBase.cs
- TagPrefixInfo.cs
- ValidationSummary.cs
- PointAnimation.cs
- Translator.cs
- OdbcEnvironmentHandle.cs
- TextWriter.cs
- BitmapDecoder.cs
- HandoffBehavior.cs
- TextTreeUndoUnit.cs
- RichTextBoxConstants.cs
- ValidatingReaderNodeData.cs
- Rectangle.cs
- RegistrationServices.cs
- FixedTextPointer.cs
- EntityDataSourceQueryBuilder.cs
- RowToParametersTransformer.cs
- ScrollProperties.cs
- DoWorkEventArgs.cs
- XmlSchemaInclude.cs
- FileUpload.cs
- Attachment.cs
- RsaKeyGen.cs
- SequenceDesigner.cs
- Crypto.cs
- AssemblyNameProxy.cs
- StrokeNodeEnumerator.cs
- Keywords.cs
- Literal.cs
- InlineObject.cs
- GeneralTransform.cs
- RuleRefElement.cs
- SqlServices.cs
- ManagementScope.cs
- ThrowHelper.cs
- _SslSessionsCache.cs
- mansign.cs
- ImmutableCollection.cs
- CodeCommentStatement.cs
- ClientConfigurationHost.cs
- DataBoundControl.cs
- IndexExpression.cs
- DesignerForm.cs
- SourceInterpreter.cs
- MenuItem.cs
- ReadOnlyHierarchicalDataSourceView.cs
- KnownTypeAttribute.cs
- DrawingDrawingContext.cs
- CommentEmitter.cs
- EventSourceCreationData.cs
- PropertyBuilder.cs
- DefaultHttpHandler.cs
- ValueOfAction.cs
- FontUnit.cs
- GroupBox.cs
- DispatcherExceptionEventArgs.cs
- Function.cs
- DefaultPrintController.cs
- AppLevelCompilationSectionCache.cs
- NameValueFileSectionHandler.cs
- SafeRegistryHandle.cs
- ConversionHelper.cs
- DescendantQuery.cs
- HtmlImageAdapter.cs
- ParameterToken.cs
- SpecialNameAttribute.cs
- SelectionProcessor.cs
- ObjectDisposedException.cs
- CapabilitiesAssignment.cs
- SqlUserDefinedTypeAttribute.cs
- MouseButtonEventArgs.cs
- WebService.cs
- UpdatableWrapper.cs
- CodeBlockBuilder.cs
- DefaultHttpHandler.cs
- RubberbandSelector.cs
- Selector.cs
- SrgsSemanticInterpretationTag.cs
- PEFileReader.cs
- CryptoConfig.cs
- HierarchicalDataBoundControl.cs
- SystemTcpStatistics.cs
- InvalidateEvent.cs
- TypeDescriptor.cs
- TreeWalkHelper.cs
- Page.cs
- DynamicQueryableWrapper.cs