使用Prism更改Xamarin Forms中的页面过渡动画 [英] Change page transition animation in Xamarin Forms with Prism

查看:165
本文介绍了使用Prism更改Xamarin Forms中的页面过渡动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Prism的INavigationService更改Xamarin Forms中的页面过渡动画?我想在Android上使用淡入淡出的动画,例如使用默认的Xamarin Forms PushAsync/PopAsync机制,或至少向左/向右滑动而不是向上/向下滑动.

Is it possible to change page transition animation in Xamarin Forms with Prism's INavigationService? I'd like to have fade animation on Android, like when using default Xamarin Forms PushAsync/PopAsync mechanism, or at least left/right sliding instead of up/down.

推荐答案

Prism使用Xamarin.Forms内置的PushAsync/PopAsync方法.这也意味着它会自动使用默认的XF动画.如果您想要自定义动画,这不是Prism不负责的事情.

Prism uses Xamarin.Forms built-in PushAsync/PopAsync methods. This also means it uses the default XF animations automatically. If you want custom animations, this is not something that Prism is not responsible for.

现在在XF中构建自定义页面过渡并不是很明确.这里有一些链接可以帮助您朝正确的方向前进.

Now building custom page transitions in XF isn't very clear cut. Here are a couple of links that should get you going in the ight direction.

https://forums.xamarin .com/discussion/18818/custom-page-transitions-with-xamarin-forms/p1

https://kernel32.net/2016/06/25/xamarin-forms-transitions.html

祝你好运!

这篇关于使用Prism更改Xamarin Forms中的页面过渡动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆