ApplicationViewSwitcher.SwitchAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SwitchAsync(Int32) |
Visually switches the calling window (app view) to another window. |
SwitchAsync(Int32, Int32) |
Visually switches the calling window (app view) to a specified window. |
SwitchAsync(Int32, Int32, ApplicationViewSwitchingOptions) |
Visually transitions the calling window (app view) to a specified window. |
SwitchAsync(Int32)
Visually switches the calling window (app view) to another window.
public:
static IAsyncAction ^ SwitchAsync(int viewId);
/// [Windows.Foundation.Metadata.Overload("SwitchAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncAction SwitchAsync(int const& viewId);
[Windows.Foundation.Metadata.Overload("SwitchAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction SwitchAsync(int viewId);
function switchAsync(viewId)
Public Shared Function SwitchAsync (viewId As Integer) As IAsyncAction
Parameters
- viewId
-
Int32
int
The ID of the window under preparation for display.
Returns
The asynchronous results of the operation. Use this to determine when the async call is complete.
- Attributes
Remarks
This method can only be called from the Application Single-Threaded Apartment (ASTA) thread of the calling, currently displayed window (core UI).
Unlike SwitchAsync(System.Int32 toViewId, System.Int32 fromViewId), this method infers fromViewId through the call from the ASTA thread.
See also
Applies to
SwitchAsync(Int32, Int32)
Visually switches the calling window (app view) to a specified window.
public:
static IAsyncAction ^ SwitchAsync(int toViewId, int fromViewId);
/// [Windows.Foundation.Metadata.Overload("SwitchFromViewAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncAction SwitchAsync(int const& toViewId, int const& fromViewId);
[Windows.Foundation.Metadata.Overload("SwitchFromViewAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction SwitchAsync(int toViewId, int fromViewId);
function switchAsync(toViewId, fromViewId)
Public Shared Function SwitchAsync (toViewId As Integer, fromViewId As Integer) As IAsyncAction
Parameters
- toViewId
-
Int32
int
The ID of the window under preparation for display.
- fromViewId
-
Int32
int
The ID of the calling, currently displayed window.
Returns
The asynchronous results of the operation. Use this to determine when the async call is complete.
- Attributes
Remarks
Unlike SwitchAsync(System.Int32 viewId), this method specifies fromViewId and frees the caller from executing the call on the Application Single-Threaded Apartment (ASTA) thread of the "from" view. By explicitly passing the same view ID as that inferred through the SwitchAsync(Int32) call, the result of the calls is identical.
See also
Applies to
SwitchAsync(Int32, Int32, ApplicationViewSwitchingOptions)
Visually transitions the calling window (app view) to a specified window.
public:
static IAsyncAction ^ SwitchAsync(int toViewId, int fromViewId, ApplicationViewSwitchingOptions options);
/// [Windows.Foundation.Metadata.Overload("SwitchFromViewWithOptionsAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncAction SwitchAsync(int const& toViewId, int const& fromViewId, ApplicationViewSwitchingOptions const& options);
[Windows.Foundation.Metadata.Overload("SwitchFromViewWithOptionsAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction SwitchAsync(int toViewId, int fromViewId, ApplicationViewSwitchingOptions options);
function switchAsync(toViewId, fromViewId, options)
Public Shared Function SwitchAsync (toViewId As Integer, fromViewId As Integer, options As ApplicationViewSwitchingOptions) As IAsyncAction
Parameters
- toViewId
-
Int32
int
The ID of the window under preparation for display.
- fromViewId
-
Int32
int
The ID of the calling, currently displayed window.
- options
- ApplicationViewSwitchingOptions
Options for the display transition behaviors.
Returns
The asynchronous results of the operation. Use this to determine when the async call is complete.
- Attributes
Remarks
Unlike SwitchAsync(System.Int32 viewId), this method specifies fromViewId and frees the caller from executing the call on the Application Single-Threaded Apartment (ASTA) thread of the "from" view. By explicitly passing the same view ID as that inferred through the SwitchAsync(Int32) call, the result of the calls is identical.