如何在WPF xaml中按下按钮时突出显示按钮
问题描述:
I have two button styles in Styles.xaml file like MyStyleButton and MyStyleButtonClick.
I applied MyStyleButton to the existing button like below
<Button Name="btnAllOrders" Content="All Orders Status" Click="btnAllOrders_Click" Height="50" Width="150" Style="{StaticResource MyStyleButton}" Margin="5" />
<Button Name="btnTakeOut" Content="Take Out" Click="btnOtherOrders_Click" Height="50" Width="150" Style="{StaticResource MyStyleButton}" Margin="5"/>
When Button is pressed I would like to apply "MyStyleButtonClick" in xaml page by using Triggers in order to show differentiation between those buttons.
Bhavana Ky
答
您可以使用EventTrigger'OnPressed'事件来实现此目的。
-Karthik
You can achieve this by using EventTrigger 'OnPressed' event.
-Karthik