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
- OdbcConnectionOpen.cs
- PowerStatus.cs
- Dictionary.cs
- CommandBinding.cs
- ClientSideProviderDescription.cs
- ScaleTransform3D.cs
- CompilerCollection.cs
- ServerValidateEventArgs.cs
- SeekStoryboard.cs
- basevalidator.cs
- Assert.cs
- DatatypeImplementation.cs
- StatusBarItem.cs
- RawStylusInputCustomDataList.cs
- XmlDataSource.cs
- HttpStreams.cs
- ManifestSignedXml.cs
- DataControlFieldCollection.cs
- TextComposition.cs
- DesignConnectionCollection.cs
- Pair.cs
- FactoryGenerator.cs
- NamespaceCollection.cs
- TextElementAutomationPeer.cs
- CodeValidator.cs
- Attributes.cs
- ObjectStorage.cs
- DataGridViewRowConverter.cs
- PrinterResolution.cs
- XPathMessageContext.cs
- HtmlInputRadioButton.cs
- PriorityRange.cs
- StagingAreaInputItem.cs
- XPathEmptyIterator.cs
- Vector3DValueSerializer.cs
- SQlBooleanStorage.cs
- AssemblyAssociatedContentFileAttribute.cs
- ResourceWriter.cs
- ScrollableControlDesigner.cs
- SqlDeflator.cs
- X509Certificate2Collection.cs
- ObjectStateEntryDbDataRecord.cs
- AutomationPropertyInfo.cs
- Cast.cs
- KeysConverter.cs
- RoamingStoreFile.cs
- UDPClient.cs
- GraphicsPathIterator.cs
- TextOutput.cs
- HttpProfileBase.cs
- UserNamePasswordServiceCredential.cs
- _SingleItemRequestCache.cs
- RootBrowserWindowAutomationPeer.cs
- ThousandthOfEmRealDoubles.cs
- MetadataCache.cs
- KeyedQueue.cs
- ChtmlLinkAdapter.cs
- MouseGestureValueSerializer.cs
- AddIn.cs
- Activator.cs
- WorkflowServiceHost.cs
- TemplateBaseAction.cs
- RadioButton.cs
- Win32KeyboardDevice.cs
- ApplicationSecurityInfo.cs
- EventMappingSettings.cs
- AsyncPostBackTrigger.cs
- ClearTypeHintValidation.cs
- HttpListenerResponse.cs
- AccessDataSourceDesigner.cs
- MultipartIdentifier.cs
- XPathMessageContext.cs
- XPathNavigatorKeyComparer.cs
- UnSafeCharBuffer.cs
- HealthMonitoringSection.cs
- ConnectionStringSettings.cs
- FormsAuthenticationUser.cs
- DSASignatureDeformatter.cs
- EmptyReadOnlyDictionaryInternal.cs
- PasswordDeriveBytes.cs
- DataGridViewCellCollection.cs
- SHA1Managed.cs
- StrongName.cs
- MemoryMappedViewStream.cs
- LinkButton.cs
- MdbDataFileEditor.cs
- User.cs
- WindowsClaimSet.cs
- EditingMode.cs
- ClassGenerator.cs
- _HeaderInfoTable.cs
- DataService.cs
- QuaternionAnimationUsingKeyFrames.cs
- XmlQuerySequence.cs
- Stroke2.cs
- WmlTextViewAdapter.cs
- Rule.cs
- MaterialCollection.cs
- OrderByQueryOptionExpression.cs
- StrongNameIdentityPermission.cs