Hi i'm wondering if someone can help me.
I'm using a WPF Ribbon control and specifically a RibbonGroup control within that. The xaml for the RibbonGroup that i am using is below.
<r:RibbonGroup x:Name="ribbonGroup" Header="Ribbon Group" >
<r:RibbonRadioButton Label="Item 1" IsChecked="True" />
<r:RibbonRadioButton Label="Item 2" />
<r:RibbonRadioButton Label="Item 3" />
</r:RibbonGroup>
Now the issue i am having is how can i identify when a selectio is changed in this group. So if i selected Item 2 or Item 3 how can i be notifified开发者_运维知识库 which actual item is selected. Is there some sort of changed event on the RibbonGroup control that i can bind to ? I have looked on the web but not really had any luck i would mega appreciate it if anyone can point me in the correct direction.
Thanks Iffy.
You want to bind to the Checked event of the radio buttons. The Checked event is a routed event, so you can bind it in the RibbonGroup element itself:
<r:RibbonGroup x:Name="ribbonGroup" Header="Ribbon Group"
RadioButton.Checked="YourEventHandler">
<r:RibbonRadioButton Label="Item 1" IsChecked="True" />
<r:RibbonRadioButton Label="Item 2" />
<r:RibbonRadioButton Label="Item 3" />
</r:RibbonGroup>
In the event handler the RoutedEventArgs.Source property is a reference to the radio button that was checked.
精彩评论