Export (0) Print
Expand All

Label.IsValid Property

Silverlight

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)

public bool IsValid { get; private set; }

Property Value

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

Dependency property identifier field: IsValidProperty

By default, the Label control indicates a validation error by making the caption text red. When the Target property is set, a Label 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.

Silverlight

Supported in: 5, 4, 3

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

Community Additions

ADD
Show:
© 2014 Microsoft