Class ViewValidationHelper
Helper methods for WPF validation.
public static class ViewValidationHelper
- Inheritance
-
ViewValidationHelper
- Inherited Members
Methods
IsValid(DependencyObject)
Validates all dependency objects in a window.
public static bool IsValid(DependencyObject node)
Parameters
node
DependencyObjectThe root dependency object, typically the dialog window.
Returns
- bool
True if all dependency objects in the logical and visual trees are valid.
Remarks
The visual tree is also checked, because any controls that are part of data templates will NOT be included in the root logical tree.
IsValid(DependencyObject, bool)
Validates all dependency objects in a window.
public static bool IsValid(DependencyObject node, bool setFocus)
Parameters
node
DependencyObjectThe root dependency object, typically the dialog window.
setFocus
boolWhether to set focus to an invalid element.
Returns
- bool
True if all dependency objects in the logical and visual trees are valid.
Remarks
The visual tree is also checked, because any controls that are part of data templates will NOT be included in the root logical tree.