Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / PropertyGridInternal / PropertiesTab.cs / 1305376 / 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;
///
///
/// [To be supplied.]
///
[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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SignedXml.cs
- WorkflowMarkupSerializationProvider.cs
- DataTableNewRowEvent.cs
- SoapHeader.cs
- BaseParagraph.cs
- ProofTokenCryptoHandle.cs
- CategoryEditor.cs
- SaveFileDialog.cs
- BrowserDefinitionCollection.cs
- MessagePropertyAttribute.cs
- SafeArrayTypeMismatchException.cs
- BitmapEffectGeneralTransform.cs
- mactripleDES.cs
- PrePrepareMethodAttribute.cs
- ForeignKeyConstraint.cs
- XmlWrappingWriter.cs
- NavigatingCancelEventArgs.cs
- DataServiceHost.cs
- NamespaceCollection.cs
- BaseParser.cs
- PTManager.cs
- AspNetSynchronizationContext.cs
- XmlUtil.cs
- UniqueConstraint.cs
- COM2PropertyDescriptor.cs
- PasswordTextContainer.cs
- IndentedTextWriter.cs
- ExceptionUtil.cs
- TabRenderer.cs
- NonParentingControl.cs
- TargetException.cs
- ActivitySurrogate.cs
- FontNameConverter.cs
- ScriptReference.cs
- DependencyPropertyHelper.cs
- HTTPNotFoundHandler.cs
- ColumnHeader.cs
- XmlNamespaceDeclarationsAttribute.cs
- grammarelement.cs
- DataRowChangeEvent.cs
- PasswordDeriveBytes.cs
- FileDocument.cs
- TextHidden.cs
- TextFindEngine.cs
- CqlParserHelpers.cs
- UnionExpr.cs
- PhysicalAddress.cs
- GetPageCompletedEventArgs.cs
- TimerElapsedEvenArgs.cs
- CatalogZoneDesigner.cs
- SchemaManager.cs
- CollectionCodeDomSerializer.cs
- TextMarkerSource.cs
- peersecurityelement.cs
- InputScopeConverter.cs
- NavigationPropertyEmitter.cs
- CaretElement.cs
- SqlDataSourceFilteringEventArgs.cs
- Parameter.cs
- DataColumnMappingCollection.cs
- SoapDocumentMethodAttribute.cs
- TableColumnCollection.cs
- SafeFileMappingHandle.cs
- ObjectDataSourceDisposingEventArgs.cs
- CheckBox.cs
- HtmlInputControl.cs
- AssemblyEvidenceFactory.cs
- CustomPopupPlacement.cs
- Enum.cs
- RegistryDataKey.cs
- MetadataItemSerializer.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- StylusPointProperties.cs
- MethodCallConverter.cs
- StackOverflowException.cs
- ImageButton.cs
- Misc.cs
- ValueChangedEventManager.cs
- BitmapFrame.cs
- ContentPlaceHolder.cs
- DurableOperationContext.cs
- NumberSubstitution.cs
- TrackingStringDictionary.cs
- RightsManagementEncryptedStream.cs
- TypedElement.cs
- RelationshipEntry.cs
- InternalConfigSettingsFactory.cs
- XmlToDatasetMap.cs
- GroupBox.cs
- WorkflowViewStateService.cs
- ReaderOutput.cs
- FlowLayout.cs
- RootProfilePropertySettingsCollection.cs
- ProgressBar.cs
- SystemUdpStatistics.cs
- ITextView.cs
- OleDbRowUpdatedEvent.cs
- TraceUtility.cs
- DependencyObjectProvider.cs
- ScrollData.cs