DependencyPropertyDescriptor 类

定义

提供 PropertyDescriptor 的扩展,用于说明依赖属性的其他属性特征。

public ref class DependencyPropertyDescriptor sealed : System::ComponentModel::PropertyDescriptor
public sealed class DependencyPropertyDescriptor : System.ComponentModel.PropertyDescriptor
type DependencyPropertyDescriptor = class
    inherit PropertyDescriptor
Public NotInheritable Class DependencyPropertyDescriptor
Inherits PropertyDescriptor
继承
DependencyPropertyDescriptor

注解

此类主要用于设计器应用程序。 这些应用程序可能需要通过属性窗口或其他用于编辑属性值的工具报告依赖属性特征。

若要检查特定属性以确定它是否有 DependencyPropertyDescriptor 可用作 PropertyDescriptor、调用 DependencyPropertyDescriptor.FromProperty(PropertyDescriptor)还是 DependencyPropertyDescriptor.FromName。 如果任一方法返回 null,则该属性不是依赖属性。 如果方法返回有效的 DependencyPropertyDescriptor,则该属性是依赖属性。

属性

AttributeArray

获取或设置属性数组。

(继承自 MemberDescriptor)
Attributes

获取此成员的属性集合。

Category

获取成员所属的类别的名称,如 CategoryAttribute中指定的。

ComponentType

获取此属性绑定到的组件的类型。

Converter

获取此属性的类型转换器。

ConverterFromRegisteredType

获取此属性的类型转换器。

(继承自 PropertyDescriptor)
DependencyProperty

返回依赖属性标识符。

Description

获取成员的说明,如 DescriptionAttribute中指定的。

DesignerCoerceValueCallback

获取或设置一个回调,设计器在依赖属性值存储在依赖属性引擎中之前,使用该回调来修改依赖属性的有效值。

DesignTimeOnly

获取是否仅在设计时设置此成员,如 DesignOnlyAttribute中指定的。

DisplayName

获取可在窗口中显示的名称,例如“属性”窗口。

IsAttached

获取一个值,该值指示属性是否注册为附加属性,并通过附加用法使用。

IsBrowsable

获取一个值,该值指示属性上 BrowsableAttribute 的值。

IsLocalizable

获取一个值,该值指示是否应本地化此属性,如 LocalizableAttribute中指定的。

IsReadOnly

获取一个值,该值指示此属性是否为只读。

Metadata

获取与依赖属性关联的元数据。

Name

获取成员的名称。

(继承自 MemberDescriptor)
NameHashCode

获取成员名称的哈希代码,如 GetHashCode()中指定的。

(继承自 MemberDescriptor)
PropertyType

获取依赖属性的表示 Type

SerializationVisibility

获取一个值,该值指示是否应按照 DesignerSerializationVisibilityAttribute中指定的方式序列化此属性。

(继承自 PropertyDescriptor)
SupportsChangeEvents

指示此属性的值更改通知是否可能源自属性描述符外部,例如来自组件本身,或者通知是否仅源自对 SetValue(Object, Object)的直接调用。

方法

AddValueChanged(Object, EventHandler)

允许在此属性更改时通知其他对象。

CanResetValue(Object)

返回重置对象是否更改其值。

CreateAttributeCollection()

使用传递给构造函数的属性数组创建特性集合。

(继承自 MemberDescriptor)
CreateInstance(Type)

创建指定类型的实例。

(继承自 PropertyDescriptor)
Equals(Object)

比较两个相等的 DependencyPropertyDescriptor 实例。

FillAttributes(IList)

PropertyDescriptor 的属性添加到父类中的指定属性列表中。

(继承自 PropertyDescriptor)
FromName(String, Type, Type, Boolean)

返回提供的属性名称的 DependencyPropertyDescriptor

FromName(String, Type, Type)

返回提供的属性名称的 DependencyPropertyDescriptor

FromProperty(DependencyProperty, Type)

返回提供的依赖属性和目标类型的 DependencyPropertyDescriptor

FromProperty(PropertyDescriptor)

返回提供的 PropertyDescriptorDependencyPropertyDescriptor

GetChildProperties()

返回默认 PropertyDescriptorCollection

(继承自 PropertyDescriptor)
GetChildProperties(Attribute[])

返回使用指定属性数组作为筛选器的 PropertyDescriptorCollection

(继承自 PropertyDescriptor)
GetChildProperties(Object, Attribute[])

返回 PropertyDescriptorCollection

GetChildProperties(Object)

返回给定对象的 PropertyDescriptorCollection

(继承自 PropertyDescriptor)
GetEditor(Type)

获取指定类型的编辑器。

GetHashCode()

返回此 DependencyPropertyDescriptor的哈希代码。

GetInvocationTarget(Type, Object)

此方法返回应在调用成员期间使用的对象。

(继承自 PropertyDescriptor)
GetType()

获取当前实例的 Type

(继承自 Object)
GetTypeFromName(String)

使用其名称返回类型。

(继承自 PropertyDescriptor)
GetValue(Object)

返回组件上属性的当前值。

GetValueChangedHandler(Object)

检索特定组件的当前 ValueChanged 事件处理程序集。

(继承自 PropertyDescriptor)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
OnValueChanged(Object, EventArgs)

引发你实现的 ValueChanged 事件。

(继承自 PropertyDescriptor)
RemoveValueChanged(Object, EventHandler)

允许在此属性更改时通知其他对象。

ResetValue(Object)

将组件的此属性的值重置为默认值。

SetValue(Object, Object)

将组件的值设置为其他值。

ShouldSerializeValue(Object)

指示此属性的值是否需要通过序列化进程持久保存。

ToString()

将此实例的值转换为其等效的字符串表示形式。

适用于