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

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

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)

为所提供的属性名称返回 DependencyPropertyDescriptor

FromName(String, Type, Type, Boolean)

为所提供的属性名称返回 DependencyPropertyDescriptor

FromProperty(DependencyProperty, Type)

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

FromProperty(PropertyDescriptor)

返回所提供的 PropertyDescriptorDependencyPropertyDescriptor

GetChildProperties()

返回默认的 PropertyDescriptorCollection

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

通过将指定的特性数组用作筛选器,返回 PropertyDescriptorCollection

(继承自 PropertyDescriptor)
GetChildProperties(Object)

返回给定对象的 PropertyDescriptorCollection

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

返回 PropertyDescriptorCollection

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()

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

适用于