New to Telerik UI for WinForms? Start a free 30-day trial

Describes a named value registered for an owner type, including its value type and default metadata.

Definition

Namespace:Telerik.Windows.Base

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public sealed class RadDependencyProperty

Inheritance: objectRadDependencyProperty

Fields

Sentinel used as the old value when a dependency property is assigned for the first time.

C#
public static readonly object UnsetValue

Properties

Gets the metadata that supplies the property's default value and optional change callback.

C#
public RadPropertyMetadata DefaultMetadata { get; }

Gets whether the property was registered as attached, allowing assignment without an owner-type match.

C#
public bool IsAttached { get; }

Gets the name used to identify the property within its owner type.

C#
public string Name { get; }

Gets the type that registered the property.

C#
public Type OwnerType { get; }

Gets the type required for non-null values assigned to the property.

C#
public Type PropertyType { get; }

Methods

Returns a hash code derived from the property's name and owner type.

C#
public override int GetHashCode()
Returns:

int

The combined hash code.

Overrides: object.GetHashCode()

Registers a property that can be assigned only to instances of its owner type, using the supplied metadata.

C#
public static RadDependencyProperty Register(string name, Type propertyType, Type ownerType, RadPropertyMetadata defaultMetadata)
Parameters:namestring

The property's registration name.

propertyTypeType

The declared type of values assigned to the property.

ownerTypeType

The type that owns the property.

defaultMetadataRadPropertyMetadata

The default value and optional property-change callback.

Returns:

RadDependencyProperty

The registered property descriptor.

A null metadata argument follows the metadata-creation and failure behavior of the overload without this parameter.

Registers a property that can be assigned only to instances of its owner type.

C#
public static RadDependencyProperty Register(string name, Type propertyType, Type ownerType)
Parameters:namestring

The property's registration name.

propertyTypeType

The declared type of values assigned to the property.

ownerTypeType

The type that owns the property.

Returns:

RadDependencyProperty

The registered property descriptor.

Exceptions: FormatException

propertyType cannot be instantiated and cast to RadPropertyMetadata.

This overload creates metadata by instantiating propertyType and casting it to RadPropertyMetadata. Most property types are not metadata types and therefore fail registration; use the overload that supplies metadata. The current failure path may surface as FormatException.

Registers an attached property that can be assigned to objects other than its owner type, using the supplied metadata.

C#
public static RadDependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType, RadPropertyMetadata defaultMetadata)
Parameters:namestring

The property's registration name.

propertyTypeType

The declared type of values assigned to the property.

ownerTypeType

The type that owns and registers the property.

defaultMetadataRadPropertyMetadata

The default value and optional property-change callback.

Returns:

RadDependencyProperty

The registered property descriptor.

A null metadata argument follows the metadata-creation and failure behavior of the overload without this parameter.

Registers an attached property that can be assigned to objects other than its owner type.

C#
public static RadDependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType)
Parameters:namestring

The property's registration name.

propertyTypeType

The declared type of values assigned to the property.

ownerTypeType

The type that owns and registers the property.

Returns:

RadDependencyProperty

The registered property descriptor.

Exceptions: FormatException

propertyType cannot be instantiated and cast to RadPropertyMetadata.

This overload creates metadata by instantiating propertyType and casting it to RadPropertyMetadata. Most property types are not metadata types and therefore fail registration; use the overload that supplies metadata. The current failure path may surface as FormatException.

Returns the registered name of this property.

C#
public override string ToString()
Returns:

string

The property's Name.

Overrides: object.ToString()