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:
public sealed class RadDependencyProperty
Inheritance: objectRadDependencyProperty
Fields
Sentinel used as the old value when a dependency property is assigned for the first time.
public static readonly object UnsetValue
Properties
Gets the metadata that supplies the property's default value and optional change callback.
public RadPropertyMetadata DefaultMetadata { get; }
Gets whether the property was registered as attached, allowing assignment without an owner-type match.
public bool IsAttached { get; }
Gets the name used to identify the property within its owner type.
public string Name { get; }
Gets the type required for non-null values assigned to the property.
public Type PropertyType { get; }
Methods
Returns a hash code derived from the property's name and owner type.
Registers a property that can be assigned only to instances of its owner type, using the supplied metadata.
public static RadDependencyProperty Register(string name, Type propertyType, Type ownerType, RadPropertyMetadata defaultMetadata)
The property's registration name.
propertyTypeTypeThe declared type of values assigned to the property.
ownerTypeTypeThe type that owns the property.
defaultMetadataRadPropertyMetadataThe default value and optional property-change callback.
Returns: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.
public static RadDependencyProperty Register(string name, Type propertyType, Type ownerType)
The property's registration name.
propertyTypeTypeThe declared type of values assigned to the property.
ownerTypeTypeThe type that owns the property.
Returns:The registered property descriptor.
Exceptions: FormatExceptionpropertyType cannot be instantiated and cast to RadPropertyMetadata.
This overload creates metadata by instantiating
propertyTypeand 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.
public static RadDependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType, RadPropertyMetadata defaultMetadata)
The property's registration name.
propertyTypeTypeThe declared type of values assigned to the property.
ownerTypeTypeThe type that owns and registers the property.
defaultMetadataRadPropertyMetadataThe default value and optional property-change callback.
Returns: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.
public static RadDependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType)
The property's registration name.
propertyTypeTypeThe declared type of values assigned to the property.
ownerTypeTypeThe type that owns and registers the property.
Returns:The registered property descriptor.
Exceptions: FormatExceptionpropertyType cannot be instantiated and cast to RadPropertyMetadata.
This overload creates metadata by instantiating
propertyTypeand 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.