Open sandboxFocus

Class Attached<T>

Type of properties that are turned into XAML attached properties by the AttachedPropertyAttribute aspect.

Inheritance
Attached<T>
Namespace: PostSharp.Patterns.Xaml
Assembly: PostSharp.Patterns.Xaml.dll
Syntax
public sealed class Attached<T>
Type Parameters
Name Description
T

The type of the underlying attached property.

Remarks

The getter of a property with the AttachedPropertyAttribute aspect returns an instance of this class. Use GetValue(DependencyObject), SetValue(DependencyObject, T) or the indexer to read or write the attached property on a DependencyObject, and RuntimeProperty to get the registered DependencyProperty, for example to override its metadata.

Properties

Name Description
this[DependencyObject]

Gets or sets the value of the current attached property for a given object (see GetValue(DependencyProperty) and SetValue(DependencyProperty, Object)).

RuntimeProperty

Gets the DependencyProperty registered at run time.

Methods

Name Description
GetValue(DependencyObject)

Gets the value of the current attached property for a given object.

SetCurrentValue(DependencyObject, T)

Synonym of SetValue(DependencyObject, T). Use that method instead.

SetValue(DependencyObject, T)

Sets the value of this attached property for a given object without changing its value source (see SetCurrentValue(DependencyProperty, Object)).

See Also