Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

DependencyProperty.ValidateValueCallback Property

Gets the value validation callback for the dependency property.

Namespace: System.Windows
Assembly: WindowsBase (in windowsbase.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public ValidateValueCallback ValidateValueCallback { get; }
/** @property */
public ValidateValueCallback get_ValidateValueCallback ()

public function get ValidateValueCallback () : ValidateValueCallback

You cannot use this property in XAML.

Property Value

The value validation callback for this dependency property, as provided for the validateValueCallback parameter in the original dependency property registration.

This property will contain a null reference (Nothing in Visual Basic) for any dependency property with no registered validation callback.

Validate value callbacks must act in a static sense: validation applied through the callback cannot determine whether the value is valid for any given instance, it can only determine whether any such instance should or should not accept the provided value as valid. If you need to perform validation that relies on knowing the values of other dependency properties on a particular instance, use a CoerceValueCallback instead, which is registered as part of a dependency property's metadata rather than directly within the dependency property identifier. For details, see Dependency Property Callbacks and Validation.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.