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
- XPathCompileException.cs
- Item.cs
- ContainerVisual.cs
- ArgIterator.cs
- AxisAngleRotation3D.cs
- DeviceSpecificDialogCachedState.cs
- XPathConvert.cs
- TreeViewItemAutomationPeer.cs
- ImageField.cs
- storagemappingitemcollection.viewdictionary.cs
- BindableAttribute.cs
- BaseResourcesBuildProvider.cs
- SizeIndependentAnimationStorage.cs
- DesignerProperties.cs
- X509Utils.cs
- SmtpFailedRecipientException.cs
- XmlSchemaImport.cs
- ContractValidationHelper.cs
- DataGridViewRowsRemovedEventArgs.cs
- ObjectStorage.cs
- UmAlQuraCalendar.cs
- XPathQilFactory.cs
- QueryStringParameter.cs
- SQLByte.cs
- StringUtil.cs
- BamlLocalizer.cs
- FacetEnabledSchemaElement.cs
- RuntimeEnvironment.cs
- XsdDuration.cs
- TextOutput.cs
- SqlNamer.cs
- CodeTypeReferenceExpression.cs
- DelegatingConfigHost.cs
- Vector3DValueSerializer.cs
- IRCollection.cs
- WebPartVerb.cs
- Equal.cs
- CroppedBitmap.cs
- TemplateField.cs
- XmlSchemaType.cs
- EnumerableWrapperWeakToStrong.cs
- StrokeIntersection.cs
- CompilerCollection.cs
- RelationshipEndCollection.cs
- EdmComplexTypeAttribute.cs
- ServicePoint.cs
- AtomServiceDocumentSerializer.cs
- EmbeddedMailObjectsCollection.cs
- WhitespaceRule.cs
- ArraySet.cs
- MultiAsyncResult.cs
- SHA256Managed.cs
- SchemaEntity.cs
- ScrollProperties.cs
- ItemCheckedEvent.cs
- AnimatedTypeHelpers.cs
- IMembershipProvider.cs
- PolicyException.cs
- MouseCaptureWithinProperty.cs
- WaveHeader.cs
- ConfigErrorGlyph.cs
- Misc.cs
- ManagedWndProcTracker.cs
- SoapReflectionImporter.cs
- StringReader.cs
- KnowledgeBase.cs
- DescendentsWalkerBase.cs
- ipaddressinformationcollection.cs
- HMACSHA256.cs
- ThicknessAnimationBase.cs
- WindowsListViewScroll.cs
- JsonObjectDataContract.cs
- Binding.cs
- DataSourceSelectArguments.cs
- DynamicValidator.cs
- ResourceType.cs
- XsltContext.cs
- StrokeFIndices.cs
- XmlSchemaObjectTable.cs
- ModelItemCollectionImpl.cs
- MarkupCompilePass1.cs
- UntrustedRecipientException.cs
- BuildManager.cs
- MDIControlStrip.cs
- TypefaceCollection.cs
- EncoderParameter.cs
- BinaryCommonClasses.cs
- WebPartZone.cs
- CommandPlan.cs
- ExpandedWrapper.cs
- ListItemConverter.cs
- Tuple.cs
- TrackBar.cs
- RouteParameter.cs
- DataAdapter.cs
- MaskedTextProvider.cs
- DataGridViewCellLinkedList.cs
- StylusPointProperty.cs
- RemotingAttributes.cs
- TraceSection.cs