DependencyProperty.IsValidType Method
Determines whether a specified value is acceptable for this dependency property's type, as checked against the property type provided in the original dependency property registration.
Namespace: System.Windows
Assembly: WindowsBase (in WindowsBase.dll)
Parameters
- value
- Type: System.Object
The value to check.
Return Value
Type: System.Booleantrue if the specified value is the registered property type or an acceptable derived type; otherwise, false.
A value of null is a valid type for reference type dependency properties, or for a Nullable<T> dependency property, and would return true for these cases. In cases where the dependency property is neither a reference nor a Nullable<T> type, IsValidType will return false for a null value rather than raise an exception.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.