PostSharpAPI ReferencePost­Sharp.​Patterns.​XamlDependency­Property­Base­AttributeValidate­Value­Method
Open sandboxFocus

DependencyPropertyBaseAttribute.ValidateValueMethod Property

ValidateValueMethod

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

Declaration
public string ValidateValueMethod
{
    [Internal(AttributeId = 6350852601680003101L)]
    get;
    [Internal(AttributeId = 6350852601680003101L)]
    set;
}
Property Value
Type Description
System.String
Remarks

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.

The initial value of the property, set by DefaultValue or the inline initializer, isn't validated this way.