Description: RadCheckBox with Windows8Theme doesn't appear as Checked during ToggleStateChanging if e.Cancel == true and RadMessageBox is shown. You should hover the check box to update its visual Checked state.
To reproduce:
-add RadCheckBox to a form
-apply Windows8Theme to the check box
-subscribe for its ToggleStateChanging and use the following code snippet:
if (args.NewValue == Telerik.WinControls.Enumerations.ToggleState.Off &&
radCheckBox2.Checked == false)
{
RadMessageBox.Show("Must Be Checked", "Required", MessageBoxButtons.OK, RadMessageIcon.Info);
args.Cancel = true;
}
Workaround:
private void radCheckBox1_ToggleStateChanging(object sender, StateChangingEventArgs args)
{
if (args.NewValue == Telerik.WinControls.Enumerations.ToggleState.Off &&
radCheckBox2.Checked == false)
{
RadCheckBox checkBox = (sender as RadCheckBox);
if (checkBox.ThemeName == "Windows8")
{
checkBox.Checked = true;
}
RadMessageBox.Show("Must Be Checked", "Required", MessageBoxButtons.OK, RadMessageIcon.Info);
args.Cancel = true;
}
}