Faerdan
Topic Author
Posts: 55
Joined: 02 Oct 2015, 09:11
Location: Galway, Ireland
Contact:

Custom Events (C# SDK)

24 May 2017, 01:05

Hey all,

I need to trigger animations in my UI from code, for example I have damage animations on a variety of elements which need to be activated at the correct time.

It seemed like using EventTrigger with a custom RoutedEvent (which I would then raise in code) was my best choice, but custom RoutedEvents do not seem to be supported in the Noesis C# SDK.

What is (currently) the best method for triggering animations from code in C#?


Thanks,

Mark
 
User avatar
sfernandez
Site Admin
Posts: 1918
Joined: 22 Dec 2011, 19:20

Re: Custom Events (C# SDK)

29 May 2017, 17:36

Hi,

Since RoutedEvents are not available in C# SDK the best option could be DataTrigger actions.
You can have properties in your view model that could be used to trigger animations defined in the xaml.
<DataTrigger Binding="{Binding StartAnim}" Value="True">
  <DataTrigger.EnterActions>
    <BeginStoryboard .../>
  </DataTrigger.EnterActions>
</DataTrigger>
Do you think this would work in your project?
 
Faerdan
Topic Author
Posts: 55
Joined: 02 Oct 2015, 09:11
Location: Galway, Ireland
Contact:

Re: Custom Events (C# SDK)

29 May 2017, 21:31

I am using DataTriggers currently, but since my animations trigger multiple times I have to toggle the value between True and False, and have a DataTrigger for each. It is messy and I really dislike it as a solution.

Will you be exposing RoutedEvents in the C# SDK, and if so what is the time frame for it's release?
 
User avatar
sfernandez
Site Admin
Posts: 1918
Joined: 22 Dec 2011, 19:20

Re: Custom Events (C# SDK)

05 Jun 2017, 16:25

Yes, we have plans to expose RoutedEvents in C# SDK in the following releases.
It is included in a list of tasks required to support behaviors and the Caliburn.Micro framework.
We want to have it implemented along the second half of the year.
 
User avatar
jsantos
Site Admin
Posts: 2906
Joined: 20 Jan 2012, 17:18
Contact:

Re: Custom Events (C# SDK)

06 Jun 2017, 15:14

Please, file a ticket about this.
Thanks!

Who is online

Users browsing this forum: No registered users and 0 guests