Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- StylusEditingBehavior.cs
- ContractSearchPattern.cs
- OleDbTransaction.cs
- DynamicEndpointElement.cs
- Vector.cs
- ListControl.cs
- GeneralTransform2DTo3D.cs
- SettingsContext.cs
- FocusChangedEventArgs.cs
- SqlMetaData.cs
- graph.cs
- EntityType.cs
- DesignerDataStoredProcedure.cs
- ConfigPathUtility.cs
- TextBlockAutomationPeer.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ButtonBase.cs
- TableHeaderCell.cs
- DefaultIfEmptyQueryOperator.cs
- XamlWriter.cs
- XPathLexer.cs
- ComponentDesigner.cs
- RuleSettingsCollection.cs
- SettingsPropertyWrongTypeException.cs
- CookieProtection.cs
- SharedStatics.cs
- ReachNamespaceInfo.cs
- DataGridViewCellFormattingEventArgs.cs
- XmlEntityReference.cs
- Storyboard.cs
- GroupBoxRenderer.cs
- ExecutionEngineException.cs
- TextFormatterImp.cs
- Roles.cs
- XmlDataDocument.cs
- TypedTableBaseExtensions.cs
- XmlQualifiedName.cs
- SmiSettersStream.cs
- TimerElapsedEvenArgs.cs
- MergeLocalizationDirectives.cs
- ToolStripMenuItemDesigner.cs
- CodeBlockBuilder.cs
- DependencyPropertyKind.cs
- WebPartTransformerAttribute.cs
- XmlCDATASection.cs
- ScriptHandlerFactory.cs
- CDSCollectionETWBCLProvider.cs
- Bitmap.cs
- XPathChildIterator.cs
- VisemeEventArgs.cs
- ExpressionBuilder.cs
- XmlMtomWriter.cs
- StringSource.cs
- WeakHashtable.cs
- TemplatePropertyEntry.cs
- DataRecordInternal.cs
- SecureStringHasher.cs
- ExpressionLexer.cs
- CoTaskMemHandle.cs
- PreviewPrintController.cs
- SafeLocalAllocation.cs
- JapaneseLunisolarCalendar.cs
- CallbackHandler.cs
- ToolStripDropDownButton.cs
- SqlUdtInfo.cs
- UnsafeMethods.cs
- BamlCollectionHolder.cs
- CaseExpr.cs
- ArrangedElement.cs
- DataGridViewColumnTypePicker.cs
- FileDialog_Vista_Interop.cs
- CalendarButton.cs
- XmlElementList.cs
- Sql8ConformanceChecker.cs
- StringConcat.cs
- DocumentReferenceCollection.cs
- Color.cs
- SqlGatherConsumedAliases.cs
- LinqDataSourceDeleteEventArgs.cs
- InvokeProviderWrapper.cs
- SqlMetaData.cs
- IpcChannelHelper.cs
- PointCollection.cs
- AliasExpr.cs
- ImageDrawing.cs
- X509Extension.cs
- MessageDecoder.cs
- PathFigureCollection.cs
- CatalogZone.cs
- WebPartDeleteVerb.cs
- WSFederationHttpBinding.cs
- ListenerServiceInstallComponent.cs
- ConnectionPointCookie.cs
- PaperSize.cs
- DiscardableAttribute.cs
- StateDesigner.CommentLayoutGlyph.cs
- MediaElement.cs
- DataGridCellItemAutomationPeer.cs
- SafeFindHandle.cs
- WindowsSysHeader.cs