Rediger

DependencyPropertyDescriptor Class

Definition

Provides an extension of PropertyDescriptor that accounts for the additional property characteristics of a dependency property.

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
Inheritance
DependencyPropertyDescriptor

Remarks

This class is primarily used by designer applications. These applications may need to report the dependency property characteristics through property windows or other tools used for editing property values.

In order to check a specific property to determine whether it has DependencyPropertyDescriptor available to serve as a PropertyDescriptor, call either DependencyPropertyDescriptor.FromProperty(PropertyDescriptor), or DependencyPropertyDescriptor.FromName. If either method returns null, then the property is not a dependency property. If the method returns a valid DependencyPropertyDescriptor , then the property is a dependency property.

Properties

Name Description
Attributes

Gets the collection of attributes for this member.

Category

Gets the name of the category that the member belongs to, as specified in the CategoryAttribute.

ComponentType

Gets the type of the component this property is bound to.

Converter

Gets the type converter for this property.

DependencyProperty

Returns the dependency property identifier.

Description

Gets the description of the member, as specified in the DescriptionAttribute.

DesignerCoerceValueCallback

Gets or sets a callback that designers use to modify the effective value of a dependency property before the dependency property value is stored in the dependency property engine.

DesignTimeOnly

Gets whether this member should be set only at design time, as specified in the DesignOnlyAttribute.

DisplayName

Gets the name that can be displayed in a window, such as a Properties window.

IsAttached

Gets a value that indicates whether the property is registered as an attached property and is being used through an attached usage.

IsBrowsable

Gets a value that indicates the value of the BrowsableAttribute on the property.

IsLocalizable

Gets a value indicating whether this property should be localized, as specified in the LocalizableAttribute.

IsReadOnly

Gets a value indicating whether this property is read-only.

Metadata

Gets the metadata associated with the dependency property.

PropertyType

Gets the represented Type of the dependency property.

SupportsChangeEvents

Indicates whether value change notifications for this property may originate from outside the property descriptor, such as from the component itself, or whether notifications will only originate from direct calls made to SetValue(Object, Object).

Methods

Name Description
AddValueChanged(Object, EventHandler)

Enables other objects to be notified when this property changes.

CanResetValue(Object)

Returns whether resetting an object changes its value.

Equals(Object)

Compares two DependencyPropertyDescriptor instances for equality.

FromName(String, Type, Type, Boolean)

Returns a DependencyPropertyDescriptor for a provided property name.

FromName(String, Type, Type)

Returns a DependencyPropertyDescriptor for a provided property name.

FromProperty(DependencyProperty, Type)

Returns a DependencyPropertyDescriptor for a provided dependency property and target type.

FromProperty(PropertyDescriptor)

Returns a DependencyPropertyDescriptor for a provided PropertyDescriptor.

GetChildProperties(Object, Attribute[])

Returns a PropertyDescriptorCollection.

GetEditor(Type)

Gets an editor of the specified type.

GetHashCode()

Returns the hash code for this DependencyPropertyDescriptor.

GetValue(Object)

Returns the current value of the property on a component.

RemoveValueChanged(Object, EventHandler)

Enables other objects to be notified when this property changes.

ResetValue(Object)

Resets the value for this property of the component to the default value.

SetValue(Object, Object)

Sets the value of the component to a different value.

ShouldSerializeValue(Object)

Indicates whether the value of this property needs to be persisted by serialization processes.

ToString()

Converts the value of this instance to its equivalent string representation.

Applies to