1

For below syntax:

<Button Content="click" >
    <Interact:Interaction.Triggers>
        <Interact:EventTrigger EventName="MouseEnter">
            <Interact:InvokeCommandAction Command="{Binding ButtonCommand}" />
        </Interact:EventTrigger>
    </Interact:Interaction.Triggers>
</Button>

How can I create a Style for Button? I want to apply this command to a lot of buttons. I'm using System.Windows.Interactivity dll for event to command.

Kylo Ren
  • 8,551
  • 6
  • 41
  • 66
  • There's no direct solution. Look here: http://stackoverflow.com/questions/1647815/how-to-add-a-blend-behavior-in-a-style-setter and here: http://stackoverflow.com/questions/22321966/interaction-triggers-in-style-in-resourcedictionary-wpf for possible options. – Dennis Apr 20 '16 at 08:59
  • @Dennis So I should use an extra class for that? is that your conclusion too? – Kylo Ren Apr 20 '16 at 09:58

0 Answers0