Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- OptimalTextSource.cs
- AssemblyBuilder.cs
- ExternalDataExchangeClient.cs
- TrackingQuery.cs
- TrackPoint.cs
- WindowsRegion.cs
- SqlCaseSimplifier.cs
- TraceSwitch.cs
- EqualityArray.cs
- ConfigXmlAttribute.cs
- ServiceObjectContainer.cs
- NetworkAddressChange.cs
- ThrowHelper.cs
- TextSelectionHighlightLayer.cs
- FacetValues.cs
- Renderer.cs
- GridProviderWrapper.cs
- FileClassifier.cs
- EnvironmentPermission.cs
- AppDomainFactory.cs
- LayoutUtils.cs
- AnchoredBlock.cs
- InputScope.cs
- DataGridViewComboBoxEditingControl.cs
- ValueQuery.cs
- IndexedString.cs
- FacetChecker.cs
- Token.cs
- TextTreeUndoUnit.cs
- WebPartPersonalization.cs
- ListControl.cs
- GridViewRowEventArgs.cs
- LayoutDump.cs
- DefaultExpressionVisitor.cs
- Size3D.cs
- ConfigXmlAttribute.cs
- SiteMapHierarchicalDataSourceView.cs
- OdbcConnectionStringbuilder.cs
- SqlDataSource.cs
- CoTaskMemUnicodeSafeHandle.cs
- OleDbParameterCollection.cs
- ContentType.cs
- TextElement.cs
- AutomationEvent.cs
- ThreadSafeList.cs
- EventTrigger.cs
- initElementDictionary.cs
- UnsafeNativeMethods.cs
- RestHandler.cs
- DataGrid.cs
- handlecollector.cs
- DependencyObjectType.cs
- ObjectViewQueryResultData.cs
- EncryptedXml.cs
- StringCollection.cs
- ListViewInsertionMark.cs
- ellipse.cs
- AnnotationResourceCollection.cs
- BitmapCodecInfoInternal.cs
- CodeCompileUnit.cs
- FileDialogCustomPlacesCollection.cs
- GridViewSelectEventArgs.cs
- FocusManager.cs
- ToolCreatedEventArgs.cs
- PerformanceCounterLib.cs
- RuntimeConfigLKG.cs
- SplineKeyFrames.cs
- SharedDp.cs
- FrameworkElementFactory.cs
- Formatter.cs
- ToggleButton.cs
- CryptographicAttribute.cs
- AnnotationHelper.cs
- PropertyTabAttribute.cs
- CallbackException.cs
- QueryComponents.cs
- DbConvert.cs
- LinqDataSourceUpdateEventArgs.cs
- BooleanProjectedSlot.cs
- GuidelineCollection.cs
- TableItemProviderWrapper.cs
- OneWayBindingElement.cs
- CultureMapper.cs
- DependencyPropertyKind.cs
- PageParser.cs
- MatrixStack.cs
- RemoteWebConfigurationHostStream.cs
- HasCopySemanticsAttribute.cs
- ConvertersCollection.cs
- ProxyWebPart.cs
- PropertyMap.cs
- UnmanagedMemoryStream.cs
- DesignerLabelAdapter.cs
- TypeDependencyAttribute.cs
- PackageDigitalSignatureManager.cs
- SqlUDTStorage.cs
- BaseDataBoundControl.cs
- ChangeConflicts.cs
- StorageBasedPackageProperties.cs
- PenThread.cs