PostSharp5.0//API Reference/Post­Sharp.​Patterns.​Xaml Namespace/Dependency­Property­Base­Attribute Class/Dependency­Property­Base­Attribute Properties/Dependency­Property­Base­Attribute.​Validate­Value­Method Property

DependencyPropertyBaseAttribute.ValidateValueMethod Property

Gets or sets the name of the method that validates the value of the property.

Namespace:  PostSharp.Patterns.Xaml
Assembly:  PostSharp.Patterns.Xaml (in PostSharp.Patterns.Xaml.dll) Version: (
public string ValidateValueMethod { get; set; }

Property Value

Type: String

The validation method must be declared in the same class as the corresponding property, return a bool value and have one parameter of the same type as the dependency property.

If this property is not set then the default ValidateFoo value is used, where Foo is the name of the dependency property.

See Also