I have several storyboards, in my opinion, that I would like to run from ViewModel, if possible. There is an easy way or an elegant way to do this. Here is what I am trying to do.
The user clicks the button → RelayCommand (in ViewModel), then the relay command should play the storyboard. In addition, one more thing, I would also like to run the storyboard animation myself in the ViewModel without any interaction.
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<cmd:EventToCommand Command="{Binding ButtonPress}" CommandParameterValue="RedButtonLight">
</cmd:EventToCommand>
</i:EventTrigger>
</i:Interaction.Triggers>
source
share