TypeDescriptor.GetDefaultProperty Метод

Определение

Возвращает свойство по умолчанию для компонента.

Перегрузки

Имя Описание
GetDefaultProperty(Object, Boolean)

Возвращает свойство по умолчанию для указанного компонента с дескриптором пользовательского типа.

GetDefaultProperty(Object)

Возвращает свойство по умолчанию для указанного компонента.

GetDefaultProperty(Type)

Возвращает свойство по умолчанию для указанного типа компонента.

GetDefaultProperty(Object, Boolean)

Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs

Возвращает свойство по умолчанию для указанного компонента с дескриптором пользовательского типа.

public:
 static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(System::Object ^ component, bool noCustomTypeDesc);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty(object component, bool noCustomTypeDesc);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component, bool noCustomTypeDesc);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")>]
static member GetDefaultProperty : obj * bool -> System.ComponentModel.PropertyDescriptor
static member GetDefaultProperty : obj * bool -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (component As Object, noCustomTypeDesc As Boolean) As PropertyDescriptor

Параметры

component
Object

Компонент, для получения свойства по умолчанию.

noCustomTypeDesc
Boolean

true не учитывать сведения о описании пользовательского типа; falseв противном случае .

Возвращаемое значение

Значение PropertyDescriptor по умолчанию или null отсутствие свойств.

Атрибуты

Исключения

component — это межпроцессный удаленный объект.

Комментарии

component Если параметр имеет значениеnull, этот метод возвращаетсяnull.

См. также раздел

Применяется к

GetDefaultProperty(Object)

Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs

Возвращает свойство по умолчанию для указанного компонента.

public:
 static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(System::Object ^ component);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty(object component);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(object component);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered. The Type of component cannot be statically discovered.")>]
static member GetDefaultProperty : obj -> System.ComponentModel.PropertyDescriptor
static member GetDefaultProperty : obj -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (component As Object) As PropertyDescriptor

Параметры

component
Object

Компонент, для получения свойства по умолчанию.

Возвращаемое значение

Значение PropertyDescriptor по умолчанию или null отсутствие свойств.

Атрибуты

Исключения

component — это межпроцессный удаленный объект.

Комментарии

component Если параметр имеет значениеnull, этот метод возвращаетсяnull.

См. также раздел

Применяется к

GetDefaultProperty(Type)

Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs
Исходный код:
TypeDescriptor.cs

Возвращает свойство по умолчанию для указанного типа компонента.

public:
 static System::ComponentModel::PropertyDescriptor ^ GetDefaultProperty(Type ^ componentType);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor? GetDefaultProperty(Type componentType);
public static System.ComponentModel.PropertyDescriptor GetDefaultProperty(Type componentType);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")>]
static member GetDefaultProperty : Type -> System.ComponentModel.PropertyDescriptor
static member GetDefaultProperty : Type -> System.ComponentModel.PropertyDescriptor
Public Shared Function GetDefaultProperty (componentType As Type) As PropertyDescriptor

Параметры

componentType
Type

Объект, Type представляющий класс для получения свойства.

Возвращаемое значение

Значение PropertyDescriptor по умолчанию или null отсутствие свойств.

Атрибуты

Комментарии

Вызовите эту версию этого метода, только если у вас нет экземпляра объекта.

componentType Если параметр имеет значениеnull, этот метод возвращаетсяnull.

См. также раздел

Применяется к