开发者

Apply SlideTransition effect to a TextBlock in XAML

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.SlideUpFade开发者_JS百科In };
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


You can not declare UIElement Transition in XAML. You can declare in XAML only Page Transitions.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜