Hello. I've created a ControlTemplate to apply a general style to all the buttons in the LayoutRoute. I've also applied Triggers for the 'IsPressed' property so that a Storyboard fires on the event. I am new to XAML and noticed that applying these triggers must have overrided the OnMouseUp triggers for each individual button. How do I create a trigger that applies to all the buttons that raises the C# procedure void buttonClick. From within this procedure I will identify which button has been clicked. Thanks!!! Code follows:
private void buttonClick(object sender, MouseButtonEventArgs e)
{
switch ((sender as Button).Name)
{
case "btnResetWorksheet":
{
break;
}
case "btnHelp":
{
break;
}
case "btnEmployerReport":
{
break;
}
Loading
Replies
Know the answer? Post it — somebody with the same question will find it here.