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
- SimpleFieldTemplateUserControl.cs
- BuildProvider.cs
- BorderSidesEditor.cs
- InvalidAsynchronousStateException.cs
- FocusTracker.cs
- TextWriter.cs
- Rules.cs
- WebReferencesBuildProvider.cs
- CompiledRegexRunner.cs
- AutomationPatternInfo.cs
- CmsUtils.cs
- ToolbarAUtomationPeer.cs
- _FtpDataStream.cs
- SafeNativeMethods.cs
- PropertyEmitterBase.cs
- path.cs
- XmlValueConverter.cs
- SelectionEditingBehavior.cs
- RoutingEndpointTrait.cs
- WebConfigurationManager.cs
- MouseButton.cs
- WebConfigurationManager.cs
- XamlPathDataSerializer.cs
- LicenseException.cs
- CacheEntry.cs
- LookupBindingPropertiesAttribute.cs
- HtmlTableRow.cs
- ElementHostAutomationPeer.cs
- TreeNodeClickEventArgs.cs
- BinaryParser.cs
- MeasurementDCInfo.cs
- StoryFragments.cs
- RangeBase.cs
- SecurityManager.cs
- CatalogPartChrome.cs
- BamlBinaryReader.cs
- CommonObjectSecurity.cs
- graph.cs
- ImageMetadata.cs
- CombinedGeometry.cs
- DataViewManager.cs
- ControlCollection.cs
- HtmlShim.cs
- VoiceSynthesis.cs
- PageScaling.cs
- GeometryModel3D.cs
- VisualTreeUtils.cs
- ConfigurationSchemaErrors.cs
- FrameworkPropertyMetadata.cs
- SqlConnectionPoolProviderInfo.cs
- RoleServiceManager.cs
- _Connection.cs
- NonceToken.cs
- Stream.cs
- ValidationHelpers.cs
- SqlCacheDependency.cs
- DataGridViewSelectedColumnCollection.cs
- SmtpReplyReaderFactory.cs
- FileSystemEventArgs.cs
- Matrix.cs
- XmlCharacterData.cs
- DataRowCollection.cs
- Pts.cs
- UITypeEditor.cs
- SplitterEvent.cs
- XmlDictionaryReader.cs
- ActiveXHelper.cs
- DynamicDocumentPaginator.cs
- BidOverLoads.cs
- SqlBulkCopyColumnMapping.cs
- SafeNativeMethods.cs
- CustomActivityDesigner.cs
- ServiceBusyException.cs
- ArrayElementGridEntry.cs
- DocumentSequence.cs
- ThicknessAnimationBase.cs
- MultipleViewProviderWrapper.cs
- TextEndOfLine.cs
- CreateWorkflowOwnerCommand.cs
- TagMapCollection.cs
- GeometryDrawing.cs
- DeferredSelectedIndexReference.cs
- EventProviderWriter.cs
- JavaScriptSerializer.cs
- Executor.cs
- embossbitmapeffect.cs
- EventMap.cs
- VoiceSynthesis.cs
- ConnectionModeReader.cs
- MutexSecurity.cs
- ScriptingJsonSerializationSection.cs
- CommandValueSerializer.cs
- TypeConvertions.cs
- ProtocolViolationException.cs
- FastEncoder.cs
- CombinedHttpChannel.cs
- XsltSettings.cs
- SupportingTokenBindingElement.cs
- DocumentReference.cs
- GridViewRow.cs