Shell.GoToAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
GoToAsync(ShellNavigationState, Boolean, IDictionary<String,Object>) |
异步导航到 |
GoToAsync(ShellNavigationState, Boolean, ShellNavigationQueryParameters) |
此方法导航到并 ShellNavigationState 返回一个 Task。 |
GoToAsync(ShellNavigationState, IDictionary<String,Object>) | |
GoToAsync(ShellNavigationState, ShellNavigationQueryParameters) |
此方法导航到一个 ShellNavigationState 并返回 Task 一个将在导航动画完成后完成的命令。 |
GoToAsync(ShellNavigationState) | |
GoToAsync(ShellNavigationState, Boolean) |
异步导航到 |
GoToAsync(ShellNavigationState, Boolean, IDictionary<String,Object>)
- Source:
- Shell.cs
- Source:
- Shell.cs
异步导航到 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
参数
- state
- ShellNavigationState
- animate
- Boolean
- parameters
- IDictionary<String,Object>
返回
注解
请注意,ShellNavigationState具有隐式转换string
Uri,因此开发人员可以编写如下代码,而无需显式实例化ShellNavigationState:
await Shell.Current.GoToAsync("app://xamarin.com/xaminals/animals/monkeys");
适用于
GoToAsync(ShellNavigationState, Boolean, ShellNavigationQueryParameters)
- Source:
- Shell.cs
- Source:
- Shell.cs
此方法导航到并 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>)
- Source:
- Shell.cs
- Source:
- Shell.cs
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
参数
- state
- ShellNavigationState
- parameters
- IDictionary<String,Object>
返回
适用于
GoToAsync(ShellNavigationState, ShellNavigationQueryParameters)
- Source:
- Shell.cs
- Source:
- Shell.cs
此方法导航到一个 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)
- Source:
- Shell.cs
- Source:
- Shell.cs
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
参数
- state
- ShellNavigationState
返回
适用于
GoToAsync(ShellNavigationState, Boolean)
- Source:
- Shell.cs
- Source:
- Shell.cs
异步导航到 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
参数
- state
- ShellNavigationState
- animate
- Boolean
返回
注解
请注意,ShellNavigationState具有隐式转换string
Uri,因此开发人员可以编写如下代码,而无需显式实例化ShellNavigationState:
await Shell.Current.GoToAsync("app://xamarin.com/xaminals/animals/monkeys");