DescriptionViewer.IsValid Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets a value that indicates whether the Target field data is valid.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data.Input (in System.Windows.Controls.Data.Input.dll)

Syntax

'Declaration
Public Property IsValid As Boolean
public bool IsValid { get; private set; }

Property Value

Type: System.Boolean
true if the field data is valid; otherwise, false.

Remarks

Dependency property identifier field: IsValidProperty

By default, the DescriptionViewer control does not display validation errors in its user interface. However, it does have validation states. You can implement these states in the control template to display a custom user interface for validation errors.

When the Target property is set, a DescriptionViewer responds to the BindingValidationError event for the Target control. It changes to its Invalid visual state when an error occurs, and to its Valid visual state when the error is resolved. In order to receive error notifications, you must set the ValidatesOnExceptions and NotifyOnValidationError properties on the Target controls Binding to true.

If the Target property is set, the IsValid property will be reset to the value in the Target control's metadata when the Refresh method is called.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.