Represents a validation rule for CheckBox controls. The Validate method checks whether the assigned check box has a value, i.e. whether the state of the check box is not indeterminate.
Inherits from
Neurodot.Forms.Silverlight.Controls. LocalizableValidationRole
Syntax
public class CheckBoxValidationRole : LocalizableValidationRole
Methods
| Name | Description |
| Validate(object) | Validates assigned control and raises or hides validation error on the control. |
Remarks
See methods RegisterValidationRole and RemoveValidationRole for details on how to assign custom validations to controls.
Example
CheckBox chbox = ThisForm.FindElement<CheckBox>("CheckBox1");
if (chbox != null)
{
chbox.IsThreeState = true;
chbox.IsChecked = null;
ThisForm.RegisterValidationRole(
chbox,
new CheckBoxValidationRole() { ResStringName = "$CheckBox1ValidationErr" }
);
}