Reputation: 118
I would like to apply a SlideTransition effect to a TextBlock similar to the title of the Calendar app which changes when scrolling down or up through the days (starting from "TODAY").
The following code reported here is a good starting point:
SlideTransition slideTransition = new SlideTransition { Mode = SlideTransitionMode.SlideUpFadeIn };
ITransition transition = slideTransition.GetTransition(ApplicationTitle);
transition.Completed += delegate { transition.Stop(); };
transition.Begin();
but I'd like to declare it in XAML rather than developing in C#.
is it possible?
thank you,
Francesco
Upvotes: 0
Views: 1225
Reputation: 2730
You can not declare UIElement Transition in XAML. You can declare in XAML only Page Transitions.
Upvotes: 1
Reputation: 25126
Is it possible? probably. almost anything is possible.
You're probably going to have to write your own attached property/event or behavior that wraps that code, and then wire that up into your xaml
Upvotes: 1