Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- SingleAnimation.cs
- SqlSelectStatement.cs
- TemplateField.cs
- RolePrincipal.cs
- ColorInterpolationModeValidation.cs
- Collection.cs
- XmlHierarchicalDataSourceView.cs
- GenericTextProperties.cs
- TextParentUndoUnit.cs
- CollectionsUtil.cs
- SimpleMailWebEventProvider.cs
- DataQuery.cs
- ProcessModelSection.cs
- MouseGestureConverter.cs
- CredentialCache.cs
- StringResourceManager.cs
- BamlRecordWriter.cs
- ControlParameter.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- NamespaceEmitter.cs
- Rfc2898DeriveBytes.cs
- SiteOfOriginContainer.cs
- SHA512Managed.cs
- DynamicMethod.cs
- PasswordTextContainer.cs
- EmptyControlCollection.cs
- WhitespaceRule.cs
- PackagingUtilities.cs
- DBCommand.cs
- SingleAnimationBase.cs
- mediapermission.cs
- WebPartCloseVerb.cs
- ActivityIdHeader.cs
- ConfigXmlDocument.cs
- InvalidComObjectException.cs
- DescendantOverDescendantQuery.cs
- DataContractSerializerOperationFormatter.cs
- WebPartMenu.cs
- PrintSystemException.cs
- RSAOAEPKeyExchangeFormatter.cs
- ClientScriptManagerWrapper.cs
- ObjectDataSourceView.cs
- ValidatingPropertiesEventArgs.cs
- Italic.cs
- Parsers.cs
- EncoderNLS.cs
- DBBindings.cs
- XmlBindingWorker.cs
- SqlMethodAttribute.cs
- UrlPath.cs
- ProfileGroupSettings.cs
- IntersectQueryOperator.cs
- ISAPIApplicationHost.cs
- TraceInternal.cs
- SqlNotificationRequest.cs
- Image.cs
- COM2FontConverter.cs
- DeploymentSectionCache.cs
- CommandField.cs
- PlanCompilerUtil.cs
- SrgsElement.cs
- ScriptComponentDescriptor.cs
- DateTimeStorage.cs
- WebZone.cs
- TcpStreams.cs
- FontDriver.cs
- ThemeableAttribute.cs
- ExpressionBuilderContext.cs
- EdmValidator.cs
- SizeF.cs
- TableLayoutSettings.cs
- SamlAttributeStatement.cs
- RoleService.cs
- XmlEncoding.cs
- UidPropertyAttribute.cs
- CompositionAdorner.cs
- DesignConnectionCollection.cs
- BlurBitmapEffect.cs
- StringConverter.cs
- ItemDragEvent.cs
- DropSourceBehavior.cs
- WinEventHandler.cs
- EntityTransaction.cs
- DbModificationClause.cs
- LineProperties.cs
- Operand.cs
- RequestCachePolicyConverter.cs
- QilTargetType.cs
- DateTimeValueSerializerContext.cs
- UriTemplateClientFormatter.cs
- WebControlParameterProxy.cs
- Visitor.cs
- Listbox.cs
- HostingPreferredMapPath.cs
- HashRepartitionStream.cs
- HMACRIPEMD160.cs
- XmlElementAttributes.cs
- ErrorLog.cs
- SettingsProviderCollection.cs
- MasterPageParser.cs