Custom Events (C# SDK)
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
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
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: Custom Events (C# SDK)
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.
Do you think this would work in your project?
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.
Code: Select all
<DataTrigger Binding="{Binding StartAnim}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard .../>
</DataTrigger.EnterActions>
</DataTrigger>
Re: Custom Events (C# SDK)
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?
Will you be exposing RoutedEvents in the C# SDK, and if so what is the time frame for it's release?
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: Custom Events (C# SDK)
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.
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.
Re: Custom Events (C# SDK)
Please, file a ticket about this.
Thanks!
Thanks!
Who is online
Users browsing this forum: Bing [Bot] and 10 guests