BindableProperty.ValidateValueDelegate<TPropertyType> Delegate
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a strongly-typed delegate that validates whether a value is acceptable for a bindable property.
public delegate bool BindableProperty.ValidateValueDelegate<in TPropertyType>(BindableObject bindable, TPropertyType value);
type BindableProperty.ValidateValueDelegate<'PropertyType> = delegate of BindableObject * 'PropertyType -> bool
Public Delegate Function BindableProperty.ValidateValueDelegate(Of In TPropertyType)(bindable As BindableObject, value As TPropertyType) As Boolean
Type Parameters
- TPropertyType
The type of the property value.
This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.Parameters
- bindable
- BindableObject
The BindableObject instance that owns the property.
- value
- TPropertyType
The strongly-typed value to validate.
Return Value
true if the value is valid; otherwise, false.
Remarks
If this delegate returns false, an ArgumentException will be thrown when attempting to set the property to the invalid value.