Shell.GoToAsync 方法

定义

重载

GoToAsync(ShellNavigationState)
GoToAsync(ShellNavigationState, Boolean)

异步导航到(可选)进行动画处理。

GoToAsync(ShellNavigationState)

public System.Threading.Tasks.Task GoToAsync (Xamarin.Forms.ShellNavigationState state);
member this.GoToAsync : Xamarin.Forms.ShellNavigationState -> System.Threading.Tasks.Task

参数

返回

Task

适用于

GoToAsync(ShellNavigationState, Boolean)

异步导航到(可选)进行动画处理。

public System.Threading.Tasks.Task GoToAsync (Xamarin.Forms.ShellNavigationState state, bool animate);
member this.GoToAsync : Xamarin.Forms.ShellNavigationState * bool -> System.Threading.Tasks.Task

参数

animate
Boolean

返回

Task

注解

请注意,ShellNavigationState具有隐式转换stringUri,因此开发人员可以编写以下代码,而无需显式实例化ShellNavigationState

await Shell.Current.GoToAsync("app://xamarin.com/xaminals/animals/monkeys");

适用于