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!
Thank you Georgi!
Sometimes I can't see the forest for the trees...
The Dispatcher did the trick!
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,
Further clarification:
The RadioButtonTools within the group are initially set to all unchecked when the XamRibbonApplicationMenu2010 is first loaded
I would like to programmatically put these buttons back to their initial state