To reproduce:
Inspect a RadCheckBox with UI Spy or Inspector and execute the DoDefaultAction method. You will see that nothing will happen.
Workaround:
Use the following classes:
public class RadCheckBoxEx : RadCheckBox
{
protected override AccessibleObject CreateAccessibilityInstance()
{
return new RadCheckBoxAccessibleObjectEx(this, this.Name);
}
}
public class RadCheckBoxAccessibleObjectEx : RadCheckBoxAccessibleObject
{
public RadCheckBoxAccessibleObjectEx(RadCheckBox owner, string name)
: base(owner, name)
{
}
public override void DoDefaultAction()
{
(this.OwnerElement as RadCheckBox).ToggleState = this.GetNextToggleState((this.OwnerElement as RadCheckBox).ToggleState);
}
private ToggleState GetNextToggleState(ToggleState toggleState)
{
if (toggleState == ToggleState.On)
{
if ((this.OwnerElement as RadCheckBox).IsThreeState)
{
return ToggleState.Indeterminate;
}
return ToggleState.Off;
}
else if (toggleState == ToggleState.Indeterminate)
{
return ToggleState.Off;
}
return ToggleState.On;
}
}