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
- CreatingCookieEventArgs.cs
- DataQuery.cs
- XamlTypeMapper.cs
- EntityKeyElement.cs
- Button.cs
- XmlKeywords.cs
- AutoGeneratedField.cs
- Expander.cs
- BaseCodeDomTreeGenerator.cs
- AccessDataSourceView.cs
- GeometryGroup.cs
- FunctionDetailsReader.cs
- X509RecipientCertificateClientElement.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SafeRightsManagementHandle.cs
- TabPanel.cs
- UriScheme.cs
- MapPathBasedVirtualPathProvider.cs
- OracleCommandBuilder.cs
- _LocalDataStore.cs
- SQLDouble.cs
- CheckPair.cs
- TableLayoutPanel.cs
- Single.cs
- XPathQilFactory.cs
- UInt64Converter.cs
- RemoteCryptoDecryptRequest.cs
- URLString.cs
- documentsequencetextcontainer.cs
- DiffuseMaterial.cs
- TextRange.cs
- PriorityBindingExpression.cs
- GraphicsState.cs
- TimerElapsedEvenArgs.cs
- WebControlAdapter.cs
- TreeNodeStyle.cs
- WebConfigurationManager.cs
- OverflowException.cs
- TimeSpanStorage.cs
- SoapExtensionImporter.cs
- PassportPrincipal.cs
- DynamicDataExtensions.cs
- PropertyIDSet.cs
- TypeLibConverter.cs
- LongValidator.cs
- _Events.cs
- QilCloneVisitor.cs
- XmlNodeChangedEventArgs.cs
- RotateTransform3D.cs
- DataGridCaption.cs
- GroupDescription.cs
- ResponseBodyWriter.cs
- BitmapEffectInputData.cs
- _AutoWebProxyScriptHelper.cs
- HttpCachePolicyBase.cs
- ChtmlTextWriter.cs
- CodeSpit.cs
- ToolStripContainer.cs
- GenerateTemporaryTargetAssembly.cs
- _TransmitFileOverlappedAsyncResult.cs
- PropertyDescriptorCollection.cs
- ResourceProperty.cs
- XmlHierarchicalDataSourceView.cs
- TemplatedControlDesigner.cs
- UInt16Converter.cs
- WindowProviderWrapper.cs
- PackWebRequest.cs
- CodeParameterDeclarationExpression.cs
- HttpContext.cs
- DesignRelation.cs
- ActiveDocumentEvent.cs
- BuildManager.cs
- PluralizationServiceUtil.cs
- DownloadProgressEventArgs.cs
- MembershipSection.cs
- Constraint.cs
- Ipv6Element.cs
- RbTree.cs
- CalendarData.cs
- ContentElement.cs
- WebPartRestoreVerb.cs
- AdditionalEntityFunctions.cs
- TagPrefixAttribute.cs
- EventListener.cs
- QueryStringParameter.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- _NegotiateClient.cs
- SQLInt64.cs
- JournalEntry.cs
- ButtonPopupAdapter.cs
- CompositeControl.cs
- TextRunProperties.cs
- ContainerUtilities.cs
- DataBindingCollectionEditor.cs
- FormatSettings.cs
- XmlReaderSettings.cs
- RegisteredHiddenField.cs
- RoutedEvent.cs
- UserUseLicenseDictionaryLoader.cs
- BamlStream.cs