Shell.GoToAsync 方法

定义

重载

GoToAsync(ShellNavigationState, Boolean, IDictionary<String,Object>)

异步导航到 state,可以选择进行动画处理。

GoToAsync(ShellNavigationState, Boolean, ShellNavigationQueryParameters)

此方法导航到 并 ShellNavigationState 返回 Task

GoToAsync(ShellNavigationState, IDictionary<String,Object>)
GoToAsync(ShellNavigationState, ShellNavigationQueryParameters)

此方法导航到 , ShellNavigationState 并返回一个 Task 将在导航动画完成后完成的 。

GoToAsync(ShellNavigationState)
GoToAsync(ShellNavigationState, Boolean)

异步导航到 state,可以选择进行动画处理。

GoToAsync(ShellNavigationState, Boolean, IDictionary<String,Object>)

异步导航到 state,可以选择进行动画处理。

public:
 System::Threading::Tasks::Task ^ GoToAsync(Microsoft::Maui::Controls::ShellNavigationState ^ state, bool animate, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ parameters);
public System.Threading.Tasks.Task GoToAsync (Microsoft.Maui.Controls.ShellNavigationState state, bool animate, System.Collections.Generic.IDictionary<string,object> parameters);
member this.GoToAsync : Microsoft.Maui.Controls.ShellNavigationState * bool * System.Collections.Generic.IDictionary<string, obj> -> System.Threading.Tasks.Task
Public Function GoToAsync (state As ShellNavigationState, animate As Boolean, parameters As IDictionary(Of String, Object)) As Task

参数

animate
Boolean
parameters
IDictionary<String,Object>

返回

注解

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

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

适用于

GoToAsync(ShellNavigationState, Boolean, ShellNavigationQueryParameters)

此方法导航到 并 ShellNavigationState 返回 Task

public:
 System::Threading::Tasks::Task ^ GoToAsync(Microsoft::Maui::Controls::ShellNavigationState ^ state, bool animate, Microsoft::Maui::Controls::ShellNavigationQueryParameters ^ shellNavigationQueryParameters);
public System.Threading.Tasks.Task GoToAsync (Microsoft.Maui.Controls.ShellNavigationState state, bool animate, Microsoft.Maui.Controls.ShellNavigationQueryParameters shellNavigationQueryParameters);
member this.GoToAsync : Microsoft.Maui.Controls.ShellNavigationState * bool * Microsoft.Maui.Controls.ShellNavigationQueryParameters -> System.Threading.Tasks.Task
Public Function GoToAsync (state As ShellNavigationState, animate As Boolean, shellNavigationQueryParameters As ShellNavigationQueryParameters) As Task

参数

state
ShellNavigationState

定义 Shell 要导航到的路径。

animate
Boolean

指示过渡是否为动画

shellNavigationQueryParameters
ShellNavigationQueryParameters

用于此特定导航操作的参数。

返回

适用于

GoToAsync(ShellNavigationState, IDictionary<String,Object>)

public:
 System::Threading::Tasks::Task ^ GoToAsync(Microsoft::Maui::Controls::ShellNavigationState ^ state, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ parameters);
public System.Threading.Tasks.Task GoToAsync (Microsoft.Maui.Controls.ShellNavigationState state, System.Collections.Generic.IDictionary<string,object> parameters);
member this.GoToAsync : Microsoft.Maui.Controls.ShellNavigationState * System.Collections.Generic.IDictionary<string, obj> -> System.Threading.Tasks.Task
Public Function GoToAsync (state As ShellNavigationState, parameters As IDictionary(Of String, Object)) As Task

参数

parameters
IDictionary<String,Object>

返回

适用于

GoToAsync(ShellNavigationState, ShellNavigationQueryParameters)

此方法导航到 , ShellNavigationState 并返回一个 Task 将在导航动画完成后完成的 。

public:
 System::Threading::Tasks::Task ^ GoToAsync(Microsoft::Maui::Controls::ShellNavigationState ^ state, Microsoft::Maui::Controls::ShellNavigationQueryParameters ^ shellNavigationQueryParameters);
public System.Threading.Tasks.Task GoToAsync (Microsoft.Maui.Controls.ShellNavigationState state, Microsoft.Maui.Controls.ShellNavigationQueryParameters shellNavigationQueryParameters);
member this.GoToAsync : Microsoft.Maui.Controls.ShellNavigationState * Microsoft.Maui.Controls.ShellNavigationQueryParameters -> System.Threading.Tasks.Task
Public Function GoToAsync (state As ShellNavigationState, shellNavigationQueryParameters As ShellNavigationQueryParameters) As Task

参数

state
ShellNavigationState

定义 Shell 要导航到的路径。

shellNavigationQueryParameters
ShellNavigationQueryParameters

用于此特定导航操作的参数。

返回

适用于

GoToAsync(ShellNavigationState)

public:
 System::Threading::Tasks::Task ^ GoToAsync(Microsoft::Maui::Controls::ShellNavigationState ^ state);
public System.Threading.Tasks.Task GoToAsync (Microsoft.Maui.Controls.ShellNavigationState state);
member this.GoToAsync : Microsoft.Maui.Controls.ShellNavigationState -> System.Threading.Tasks.Task
Public Function GoToAsync (state As ShellNavigationState) As Task

参数

返回

适用于

GoToAsync(ShellNavigationState, Boolean)

异步导航到 state,可以选择进行动画处理。

public:
 System::Threading::Tasks::Task ^ GoToAsync(Microsoft::Maui::Controls::ShellNavigationState ^ state, bool animate);
public System.Threading.Tasks.Task GoToAsync (Microsoft.Maui.Controls.ShellNavigationState state, bool animate);
member this.GoToAsync : Microsoft.Maui.Controls.ShellNavigationState * bool -> System.Threading.Tasks.Task
Public Function GoToAsync (state As ShellNavigationState, animate As Boolean) As Task

参数

animate
Boolean

返回

注解

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

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

适用于