Possible duplicate:
How to add Blend behavior in style customization
when I use a style interaction trigger, I get the following error: "triggers are not an attachable element of type style". Any explanation of what this error actually means and how to solve it.
For reference, check out an example of the EventToCommand MVVM Light toolkit.
In this particular case, I use the timeline control from Infragistics, which represents events as an EventTitle, and when the EventTitle is clicked, I would like to raise this command (note that the Timeline control does not define any event, such as EventTitleClicked). Currently, I can achieve functionality using events and calling my ViewModel method from the code behind, instead I would like to call the command directly from xaml.
<Style x:Key="EventTitleTopStyle" TargetType="igTl:EventTitle">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
</i:EventTrigger>
</i:Interaction.Triggers>
<EventSetter Event="MouseLeftButtonDown" Handler="TopTitleMouseLeftButtonDown" />
....
source
share