【发布时间】:2016-09-27 12:27:13
【问题描述】:
如何突出显示最后一次单击的按钮,以便用户确保显示正确的内容? (我希望为特定内容突出显示 1 个按钮,直到单击另一个按钮)。
我正在使用功能区 (System.Windows.Controls.Ribbon)。 应该突出显示的按钮位于 RibbonGroup 内部,它们用于更改主要内容。
其他按钮应该正常运行(我想限制点击后突出显示的按钮数量)
我使用模型-视图-视图模型模式
<Ribbon DockPanel.Dock="top">
<RibbonTab Header="Home">
<RibbonGroup Header="Process Flow">
<StackPanel Orientation="Horizontal">
<RibbonButton Label="Style change" LargeImageSource="pack://application:,,,/Resources/StyleChange.png"></RibbonButton>
<RibbonButton Label="Settings" Command="{Binding ChangeToSettingContentCommand}" LargeImageSource="pack://application:,,,/Resources/Settings.png"></RibbonButton>
<RibbonButton Label="Firmware changes" LargeImageSource="pack://application:,,,/Resources/Code.png"></RibbonButton>
<RibbonButton x:Name="testsButton" Label="Tests" Command="{Binding ChangeToTestContentCommand}" LargeImageSource="pack://application:,,,/Resources/test.png"></RibbonButton>
</StackPanel>
</RibbonGroup>
【问题讨论】: