Page 1 of 1

How to initiate?

Posted: 22 Dec 2023, 10:03
by ShawnHarris
I intend to initiate a storyboard when an event is triggered from a viewmodel. What would be the most effective approach to accomplish this?

Re: How to initiate?

Posted: 22 Dec 2023, 10:29
by sfernandez
Hello,

What engine are you using: Unity, Unreal, custom C++ or C#?

Anyway, you can fire an event from your viewmodel and listen to it from the UI using the DataEventTrigger:
<TextBlock Text="Download Finished!" Visibility="Collapsed">
    <b:Interaction.Triggers>
      <noesis:DataEventTrigger Source="{Binding}" EventName="DownloadFinished">
        <b:ControlStoryboardAction Storyboard="{StaticResource ShowDownloadText}"/>
      </noesis:DataEventTrigger>
    </b:Interaction.Triggers>
  </TextBlock>
Hope this helps.