ShawnHarris
Topic Author
Posts: 1
Joined: 01 Dec 2023, 12:13

How to initiate?

22 Dec 2023, 10:03

I intend to initiate a storyboard when an event is triggered from a viewmodel. What would be the most effective approach to accomplish this?
 
User avatar
sfernandez
Site Admin
Posts: 2997
Joined: 22 Dec 2011, 19:20

Re: How to initiate?

22 Dec 2023, 10:29

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.

Who is online

Users browsing this forum: Google [Bot] and 2 guests