[Enhancement] Animation XAML Api #81
Unanswered
mgierlasinski
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Built-in XAML Api for current Xamarin Animation system making easier to create binding friendly animations without third party libraries.
API Changes
Create concept of Storyboard and animations animating properties of given type on any target in XAML tree. Api similar to what is available now in Xamanimation, possibly enhanced with capabilities of UWP animation.
Intended Use Case
Animation Api in C# is powerful but requires some boilerplace code, typically in trigger actions, to run when some condition are met. Common example is binding
IsVisible
with some property in View Model, if you just don't want to show or hide something but make fluent animation instead. Today in Xamarin.Forms you have to makeDataTrigger
and create custom action with properties like From, To, Duration, maybe Easing, that runs the animation. You can also use great Xamanimation but that is another external library and for several simple animations you may want to avoid this extra reference. Xamanimation targetsVisualElement
but you may want to work on lower level and targetBindableObject
. Having animation as a XAML baked into MAUI would make motion more common, current Animation C# Api is for some reason not very well known.Beta Was this translation helpful? Give feedback.
All reactions