PostSharp6.1/API Reference/Post­Sharp.​Patterns.​Xaml Namespace/Dependency­Property­Services Class/Dependency­Property­Services Methods/Dependency­Property­Services.​Get­Dependency­Property Method/Dependency­Property­Services.​Get­Dependency­Property(T) Method (Expression(Func(T)))

DependencyPropertyServices.GetDependencyProperty<T> Method (Expression<Func<T>>)

Gets the DependencyProperty object associated with a property of a given name for a given type. The property name and the property owner type are extracted from the expression argument.

Namespace:  PostSharp.Patterns.Xaml
Assembly:  PostSharp.Patterns.Xaml (in PostSharp.Patterns.Xaml.dll) Version: 6.1.23.0 (6.1.23.0)
Syntax
C#
public static DependencyProperty GetDependencyProperty<T>(
	Expression<Func<T>> expression
)

Parameters

expression
Type: System.Linq.Expressions.Expression<Func<T>>
The lambda expression in the format () => new ClassName().PropertyName.

Type Parameters

T

Return Value

Type: DependencyProperty
The DependencyProperty instance.
See Also