Class
RadDependencyProperty

Represents a dependency property, enabling property value inheritance, styling, and data binding.

Definition

Namespace:Telerik.Windows.Base

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public sealed class RadDependencyProperty

Inheritance: objectRadDependencyProperty

Fields

UnsetValue

Declaration

cs-api-definition
public static readonly object UnsetValue

Field Value

object

Properties

DefaultMetadata

Gets the default metadata for a dependency property.

Declaration

cs-api-definition
public RadPropertyMetadata DefaultMetadata { get; }

Property Value

RadPropertyMetadata

IsAttached

Indicates whether a property is an attached property.

Declaration

cs-api-definition
public bool IsAttached { get; }

Property Value

bool

Name

Gets the name of the dependency property.

Declaration

cs-api-definition
public string Name { get; }

Property Value

string

OwnerType

Gets the owner type for the dependency property.

Declaration

cs-api-definition
public Type OwnerType { get; }

Property Value

Type

PropertyType

Gets the type of the property associated with the RadDependencyProperty instance.

Declaration

cs-api-definition
public Type PropertyType { get; }

Property Value

Type

Methods

GetHashCode()

Returns a hash code for the current instance of the RadDependencyProperty.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for the current instance.

Overrides object.GetHashCode()

Register(string, Type, Type)

Registers a dependency property in the specified owner type. This method allows you to create a property that supports data binding, animation, and default values.

Declaration

cs-api-definition
public static RadDependencyProperty Register(string name, Type propertyType, Type ownerType)

Parameters

name

string

The name of the dependency property as a string.

propertyType

Type

The type of the property being registered.

ownerType

Type

The type that owns the dependency property.

Returns

RadDependencyProperty

A RadDependencyProperty that can be used to access and set the value of the registered property.

Register(string, Type, Type, RadPropertyMetadata)

Registers a dependency property with the specified name, property type, owner type, and metadata.

Declaration

cs-api-definition
public static RadDependencyProperty Register(string name, Type propertyType, Type ownerType, RadPropertyMetadata defaultMetadata)

Parameters

name

string

The name of the dependency property.

propertyType

Type

The type of the property being registered.

ownerType

Type

The type that owns the dependency property.

defaultMetadata

RadPropertyMetadata

The metadata associated with the dependency property.

Returns

RadDependencyProperty

A reference to the registered dependency property.

RegisterAttached(string, Type, Type)

Registers an attached dependency property with the specified name, property type, and owner type.

Declaration

cs-api-definition
public static RadDependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType)

Parameters

name

string

The name of the attached property to register.

propertyType

Type

The type of the attached property.

ownerType

Type

The type that owns this attached property.

Returns

RadDependencyProperty

A RadDependencyProperty that represents the registered attached property.

RegisterAttached(string, Type, Type, RadPropertyMetadata)

Registers an attached dependency property with the specified parameters.

Declaration

cs-api-definition
public static RadDependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType, RadPropertyMetadata defaultMetadata)

Parameters

name

string

The name of the dependency property.

propertyType

Type

The type of the property.

ownerType

Type

The type that owns the property.

defaultMetadata

RadPropertyMetadata

The metadata for the property, which can include default values and property changed callbacks.

Returns

RadDependencyProperty

The registered dependency property.

ToString()

Returns a string representation of the current instance of the RadDependencyProperty class.

Declaration

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current RadDependencyProperty instance.

Overrides object.ToString()