Open sandboxFocus

Method ValidateValueDynamic

ValidateValueDynamic(object, string, LocationKind, LocationValidationContext)

Validates a weakly-typed (boxed) value, typically the value of a dependency property or an attached property.

Declaration
public virtual Exception ValidateValueDynamic(object value, string locationName, LocationKind locationKind, LocationValidationContext context)
Parameters
Type Name Description
object value

Value.

string locationName

The name of the property.

LocationKind locationKind

The kind of location (typically a Property).

LocationValidationContext context

Why or when the value is being validated.

Returns
Type Description
Exception

An Exception if the value is invalid, or null if the value is valid.