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
- SqlBulkCopyColumnMapping.cs
- StylesEditorDialog.cs
- TableLayoutSettingsTypeConverter.cs
- SoapReflectionImporter.cs
- DiscardableAttribute.cs
- StaticDataManager.cs
- LinkUtilities.cs
- EntityDataSourceContainerNameItem.cs
- PathNode.cs
- ReaderOutput.cs
- DataGridViewCellStyle.cs
- _Semaphore.cs
- DSGeneratorProblem.cs
- HtmlCommandAdapter.cs
- HtmlInputHidden.cs
- QilScopedVisitor.cs
- XmlCustomFormatter.cs
- SqlDataSourceFilteringEventArgs.cs
- XmlSchemaExternal.cs
- ParseNumbers.cs
- ErrorActivity.cs
- ConfigurationSection.cs
- BindValidator.cs
- SQLDecimalStorage.cs
- documentsequencetextpointer.cs
- ListDesigner.cs
- DisplayNameAttribute.cs
- TableLayoutSettings.cs
- DataComponentGenerator.cs
- Button.cs
- BoundPropertyEntry.cs
- QuadraticBezierSegment.cs
- KnownTypesProvider.cs
- BufferedWebEventProvider.cs
- SourceItem.cs
- StrongTypingException.cs
- RealizationDrawingContextWalker.cs
- VectorAnimation.cs
- HeaderUtility.cs
- xsdvalidator.cs
- TextElementAutomationPeer.cs
- GetIndexBinder.cs
- PopupControlService.cs
- PathSegmentCollection.cs
- DelimitedListTraceListener.cs
- IdSpace.cs
- CaseExpr.cs
- TypeToArgumentTypeConverter.cs
- BitmapEffectRenderDataResource.cs
- TemplateColumn.cs
- DataGridViewSelectedCellCollection.cs
- TextReturnReader.cs
- ExtensionWindowHeader.cs
- RegisteredScript.cs
- AuthorizationContext.cs
- ProcessHostFactoryHelper.cs
- ErrorWrapper.cs
- WCFModelStrings.Designer.cs
- DataGridTextBoxColumn.cs
- DataColumnCollection.cs
- DataProviderNameConverter.cs
- XmlHierarchyData.cs
- AsyncPostBackErrorEventArgs.cs
- NetworkInformationException.cs
- MaskedTextProvider.cs
- ScriptReferenceBase.cs
- DbModificationCommandTree.cs
- HierarchicalDataBoundControlAdapter.cs
- HwndHost.cs
- FastEncoder.cs
- RuntimeConfig.cs
- OleDbParameter.cs
- UnsafeNativeMethods.cs
- ObjectDataSourceView.cs
- RelatedView.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- OleDbInfoMessageEvent.cs
- RuntimeResourceSet.cs
- PriorityQueue.cs
- AvTraceDetails.cs
- AmbientEnvironment.cs
- AnnotationMap.cs
- TextEditorParagraphs.cs
- PersonalizationDictionary.cs
- DivideByZeroException.cs
- Operator.cs
- ApplicationFileCodeDomTreeGenerator.cs
- TextSelection.cs
- ImpersonateTokenRef.cs
- ManipulationInertiaStartingEventArgs.cs
- SiteOfOriginContainer.cs
- StringValueSerializer.cs
- SessionStateItemCollection.cs
- ToolBarButtonClickEvent.cs
- ArraySubsetEnumerator.cs
- DockingAttribute.cs
- DefaultMemberAttribute.cs
- BrowsableAttribute.cs
- HwndKeyboardInputProvider.cs
- NameSpaceExtractor.cs