WPF RibbonGroup 选择已更改事件
嗨,我想知道是否有人可以帮助我。
我正在使用 WPF Ribbon 控件,特别是其中的 RibbonGroup 控件。我正在使用的 RibbonGroup 的 xaml 如下。
<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>
现在我遇到的问题是如何识别该组中的选择何时更改。因此,如果我选择了项目 2 或项目 3,如何通知我选择了哪个实际项目。 RibbonGroup 控件上是否有某种可以绑定的更改事件?我在网上查看过,但并没有什么运气,如果有人能指出我正确的方向,我将非常感激。
谢谢 不确定。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想要绑定到单选按钮的 Checked 事件。 Checked 事件是路由事件,因此您可以将其绑定到 RibbonGroup 元素本身中:
在事件处理程序中,RoatedEventArgs.Source 属性是对已选中的单选按钮的引用。
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:
In the event handler the RoutedEventArgs.Source property is a reference to the radio button that was checked.