Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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. // Copyright (c) Microsoft Corporation. All rights reserved.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ColorMatrix.cs
- TaskForm.cs
- NoneExcludedImageIndexConverter.cs
- ToolStripContainer.cs
- HostedImpersonationContext.cs
- DurableInstancingOptions.cs
- NavigationHelper.cs
- CompositeCollection.cs
- HyperLink.cs
- BinaryCommonClasses.cs
- Activity.cs
- ObjectSecurity.cs
- IndexerNameAttribute.cs
- MsmqInputChannelListener.cs
- HitTestParameters3D.cs
- ConstructorNeedsTagAttribute.cs
- Publisher.cs
- HandleRef.cs
- TextEncodedRawTextWriter.cs
- StringBuilder.cs
- IncrementalReadDecoders.cs
- PointAnimationUsingPath.cs
- StylusPointPropertyInfo.cs
- SplitterEvent.cs
- Serializer.cs
- XamlStyleSerializer.cs
- HttpHandler.cs
- ProfileParameter.cs
- Column.cs
- TypeDescriptor.cs
- ColumnResizeUndoUnit.cs
- ItemCollection.cs
- UrlPath.cs
- AdornerPresentationContext.cs
- ApplicationId.cs
- GridViewDeleteEventArgs.cs
- ExecutionEngineException.cs
- AutomationTextAttribute.cs
- Sql8ExpressionRewriter.cs
- _Events.cs
- SafeUserTokenHandle.cs
- SchemaNamespaceManager.cs
- Calendar.cs
- Variant.cs
- Shape.cs
- ButtonFieldBase.cs
- DateTimeOffsetAdapter.cs
- DesignerActionMethodItem.cs
- DeviceFiltersSection.cs
- OutputCacheSettingsSection.cs
- WindowInteractionStateTracker.cs
- FeatureManager.cs
- ObjectIDGenerator.cs
- OleDbTransaction.cs
- ServiceMemoryGates.cs
- RemoteWebConfigurationHost.cs
- XmlImplementation.cs
- ComponentEditorForm.cs
- MSG.cs
- RemotingSurrogateSelector.cs
- GridPattern.cs
- UrlMappingCollection.cs
- DiagnosticTrace.cs
- BinaryUtilClasses.cs
- ListViewInsertedEventArgs.cs
- TextRangeAdaptor.cs
- PartialCachingControl.cs
- InstanceHandleReference.cs
- MembershipSection.cs
- TextParagraph.cs
- SmtpReplyReader.cs
- XmlSchemaFacet.cs
- EventLog.cs
- PromptEventArgs.cs
- COM2FontConverter.cs
- WebPartConnectionsCancelEventArgs.cs
- Literal.cs
- DBAsyncResult.cs
- WinEventQueueItem.cs
- DataGridViewComboBoxCell.cs
- ChangePassword.cs
- ReadOnlyActivityGlyph.cs
- ParameterBinding.cs
- UncommonField.cs
- CaseInsensitiveHashCodeProvider.cs
- ExpressionLexer.cs
- GeometryModel3D.cs
- FormatterConverter.cs
- XmlSchemaElement.cs
- PropertyGridEditorPart.cs
- hwndwrapper.cs
- RefreshEventArgs.cs
- _ShellExpression.cs
- StreamAsIStream.cs
- XmlAggregates.cs
- URL.cs
- Converter.cs
- XmlWriter.cs
- PauseStoryboard.cs
- ShaderRenderModeValidation.cs