PostSharp6.3/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(TClass, TProperty) Method (Expression(Func(TClass, TProperty)))

DependencyPropertyServices.GetDependencyProperty<TClass, TProperty> Method (Expression<Func<TClass, TProperty>>)

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.3.11.0 (6.3.11.0)
Syntax
C#
public static DependencyProperty GetDependencyProperty<TClass, TProperty>(
	Expression<Func<TClass, TProperty>> expression
)

Parameters

expression
Type: System.Linq.Expressions.Expression<Func<TClass, TProperty>>
The lambda expression in the format (ClassName x) => x.PropertyName.

Type Parameters

TClass
TProperty

Return Value

Type: DependencyProperty
The DependencyProperty instance.
See Also