Completed
Last Updated: 16 Feb 2015 16:05 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 26 Jul 2013 05:06
Category: UI Framework
Type: Bug Report
0
FIX. Theme - Windows8Theme - RadCheckBox with Windows8Theme doesn't appear as Checked during ToggleStateChanging if e.Cancel == true and RadMessageBox is shown
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;
            }
        }
0 comments