I have RadioButtonTools within the same group, and all are behaving as expected
Is there a way to uncheck all buttons within the group after a button within the group has been clicked/checked?
Unchecking the ButtonTool in the click event has no effect (it gets checked again)
Thank you!
Hi,
Unchecking the RadioButtonTool in the click event should work. I tried it using the following code:
XAML:
<ig:XamRibbonGroup Caption="Group1"> <ig:RadioButtonTool Caption="Radio Button 1" Click="RadioButtonTool_Click" GroupName="rbgroup"/> <ig:RadioButtonTool Caption="Radio Button 2" Click="RadioButtonTool_Click" GroupName="rbgroup" /> <ig:RadioButtonTool Caption="Radio Button 3" Click="RadioButtonTool_Click" GroupName="rbgroup" /> </ig:XamRibbonGroup>
C#:
private void RadioButtonTool_Click(object sender, RibbonToolEventArgs e) { RadioButtonTool rb = (RadioButtonTool)e.Tool; if (rb.IsChecked) { this.Dispatcher.BeginInvoke(() => { rb.IsChecked = false; }); } }
Hope this helps,
Thank you Georgi!
Sometimes I can't see the forest for the trees...
The Dispatcher did the trick!