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
- CodePageUtils.cs
- ImpersonationContext.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- BitmapEffectInputData.cs
- RegexInterpreter.cs
- ProfileBuildProvider.cs
- ExtensionDataObject.cs
- ListViewHitTestInfo.cs
- NumberFormatInfo.cs
- ReflectionTypeLoadException.cs
- ProjectionRewriter.cs
- RelationshipNavigation.cs
- DriveNotFoundException.cs
- AssemblySettingAttributes.cs
- ExpressionNode.cs
- ThreadNeutralSemaphore.cs
- MenuStrip.cs
- ActivityStateRecord.cs
- SecurityRuntime.cs
- ClientType.cs
- FaultHandlingFilter.cs
- MarkupCompilePass2.cs
- XmlSchemaAttribute.cs
- SecurityState.cs
- Int16.cs
- PriorityQueue.cs
- WMIInterop.cs
- GenericXmlSecurityToken.cs
- FileDialog_Vista.cs
- FontNamesConverter.cs
- ValueTypeFieldReference.cs
- Overlapped.cs
- AssociationType.cs
- SslStream.cs
- XmlDictionaryReader.cs
- WebResponse.cs
- SingleAnimationBase.cs
- NativeMethods.cs
- MetadataException.cs
- SQLInt64.cs
- Point3DCollectionConverter.cs
- NonValidatingSecurityTokenAuthenticator.cs
- SafeCryptHandles.cs
- MissingMethodException.cs
- DataGridViewCellStyleBuilderDialog.cs
- Registration.cs
- StylusPointPropertyId.cs
- CompModSwitches.cs
- MenuItem.cs
- XPathNodeList.cs
- KeyProperty.cs
- ValueSerializerAttribute.cs
- MapPathBasedVirtualPathProvider.cs
- PropertyChangeTracker.cs
- IPipelineRuntime.cs
- Transform3DGroup.cs
- SelectionRangeConverter.cs
- XmlQueryContext.cs
- PrivilegeNotHeldException.cs
- initElementDictionary.cs
- AsnEncodedData.cs
- ImageField.cs
- DataList.cs
- QueryReaderSettings.cs
- InstallHelper.cs
- StandardToolWindows.cs
- __Filters.cs
- TypeInfo.cs
- MultiByteCodec.cs
- PointAnimation.cs
- WindowInteractionStateTracker.cs
- NativeMethodsCLR.cs
- CodeIndexerExpression.cs
- ItemsControl.cs
- ToolStripContainer.cs
- HttpListenerRequestTraceRecord.cs
- FlatButtonAppearance.cs
- FileLogRecordStream.cs
- HitTestDrawingContextWalker.cs
- CompilationUtil.cs
- UserNameSecurityTokenParameters.cs
- StateManager.cs
- XpsFixedPageReaderWriter.cs
- AdCreatedEventArgs.cs
- FormsAuthenticationTicket.cs
- ControlAdapter.cs
- HostAdapter.cs
- TextModifierScope.cs
- ResXResourceSet.cs
- CheckBoxField.cs
- WebPartUtil.cs
- FixedSOMElement.cs
- Listen.cs
- ClientSettingsSection.cs
- ConditionalAttribute.cs
- CqlLexer.cs
- FlowPosition.cs
- ColorAnimation.cs
- ColorAnimation.cs
- DataTable.cs