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
- RpcCryptoRequest.cs
- MethodBuilderInstantiation.cs
- XamlPointCollectionSerializer.cs
- PersistChildrenAttribute.cs
- SchemaElementLookUpTableEnumerator.cs
- GatewayDefinition.cs
- RootProjectionNode.cs
- ThreadStateException.cs
- EditingCoordinator.cs
- QuestionEventArgs.cs
- NullToBooleanConverter.cs
- DescriptionAttribute.cs
- SecurityUtils.cs
- BufferBuilder.cs
- TextAction.cs
- IntSumAggregationOperator.cs
- WebZone.cs
- Rectangle.cs
- IntPtr.cs
- ListBoxItem.cs
- RuleProcessor.cs
- HuffModule.cs
- ToolstripProfessionalRenderer.cs
- ToolboxSnapDragDropEventArgs.cs
- XmlToDatasetMap.cs
- BaseProcessor.cs
- Instrumentation.cs
- StackOverflowException.cs
- _UriTypeConverter.cs
- DiagnosticTraceSource.cs
- CompilerInfo.cs
- DesignerHierarchicalDataSourceView.cs
- SkipStoryboardToFill.cs
- PrtCap_Builder.cs
- SoapSchemaMember.cs
- ArcSegment.cs
- PolicyManager.cs
- ObjectListCommand.cs
- SqlConnectionString.cs
- XmlSchemaObject.cs
- IResourceProvider.cs
- ExtendedPropertyCollection.cs
- coordinator.cs
- Color.cs
- FormsAuthenticationModule.cs
- RadioButtonRenderer.cs
- TypedDatasetGenerator.cs
- FamilyTypefaceCollection.cs
- WaitForChangedResult.cs
- GetPageCompletedEventArgs.cs
- Vector3DCollection.cs
- OutputCacheSettingsSection.cs
- XPathNavigator.cs
- List.cs
- SettingsBase.cs
- EmptyEnumerator.cs
- NeutralResourcesLanguageAttribute.cs
- _TransmitFileOverlappedAsyncResult.cs
- QuaternionAnimationUsingKeyFrames.cs
- RegexBoyerMoore.cs
- PaintValueEventArgs.cs
- MappedMetaModel.cs
- StylusSystemGestureEventArgs.cs
- CustomError.cs
- BindingsCollection.cs
- TableLayoutRowStyleCollection.cs
- ActivityWithResultWrapper.cs
- SmtpLoginAuthenticationModule.cs
- CodeAssignStatement.cs
- HoistedLocals.cs
- DetailsViewDeleteEventArgs.cs
- ParallelActivityDesigner.cs
- connectionpool.cs
- DbMetaDataColumnNames.cs
- NotImplementedException.cs
- ResXBuildProvider.cs
- Logging.cs
- BoolExpr.cs
- HostedTransportConfigurationBase.cs
- TextSelectionHelper.cs
- ReflectionTypeLoadException.cs
- DbDataAdapter.cs
- ArraySet.cs
- dsa.cs
- MessageBox.cs
- DecoratedNameAttribute.cs
- CachedFontFamily.cs
- XmlAttributeHolder.cs
- LocalizabilityAttribute.cs
- DbParameterCollection.cs
- DefaultShape.cs
- NavigationCommands.cs
- ApplicationActivator.cs
- AsyncDataRequest.cs
- PixelShader.cs
- FontDialog.cs
- ClientProtocol.cs
- TransformedBitmap.cs
- AuthorizationRuleCollection.cs
- ListBindingConverter.cs