ฉันจะเน้นปุ่มสุดท้ายที่ถูกคลิกเพื่อให้ผู้ใช้แน่ใจว่าเนื้อหาถูกต้องแสดงได้อย่างไร (ฉันต้องการให้มีปุ่มไฮไลต์ 1 ปุ่มสำหรับเนื้อหาเฉพาะจนกว่าจะมีการคลิกอีกปุ่มหนึ่ง)
ฉันกำลังใช้ Ribbon (System.Windows.Controls.Ribbon) ปุ่มที่ควรไฮไลต์จะอยู่ภายใน RibbonGroup และมีไว้สำหรับเปลี่ยนเนื้อหาหลัก
ปุ่มอื่นๆ ควรทำงานได้ตามปกติ (ฉันต้องการจำกัดจำนวนปุ่มที่ถูกไฮไลต์หลังจากการคลิก)
ฉันใช้รูปแบบ Model-View-ViewModel
<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>