ApplicationViewSwitcher ApplicationViewSwitcher ApplicationViewSwitcher ApplicationViewSwitcher Class

Represents the app view switching behaviors for an app.

Syntax

Declaration

public static class ApplicationViewSwitcherpublic static class ApplicationViewSwitcherPublic Static Class ApplicationViewSwitcher

Methods summary

Disables the primary window (app view) when the app is activated, showing the most recently displayed window instead.

Disables Windows shell control of the view selection on activation, and lets the app handle it instead.

Prepares your app to visually transition between two windows with a custom animation.

Visually replaces the calling window (app view) with a specified window.

Visually replaces the calling window (app view) with a specified window.

Visually replaces the calling window (app view) with a specified window.

Displays another window (app view) for the app on the screen, adjacent to the original window

Displays another window (app view) for the app on the screen, adjacent to the original window

Displays another window (app view) for the app on the screen, adjacent to the original window.

Prerelease. Displays a view as a standalone view in the desired view mode.

Prerelease. Displays a view as a standalone view in the desired view mode with the specified options.

Methods

  • DisableShowingMainViewOnActivation()
    DisableShowingMainViewOnActivation()
    DisableShowingMainViewOnActivation()
    DisableShowingMainViewOnActivation()

    Disables the primary window (app view) when the app is activated, showing the most recently displayed window instead.

    public static void DisableShowingMainViewOnActivation()public static void DisableShowingMainViewOnActivation()Public Static Function DisableShowingMainViewOnActivation() As void

    Remarks

    By default, the app object displays the main window of the app when it is first activated. This method forces the app to display the most recently displayed window upon subsequent activations. Note that the app must call this method before completing the first non-hosted activation, and the app must also only call Activate() for hosted activations from the UI thread of the displayed window.

  • DisableSystemViewActivationPolicy()
    DisableSystemViewActivationPolicy()
    DisableSystemViewActivationPolicy()
    DisableSystemViewActivationPolicy()

    Disables Windows shell control of the view selection on activation, and lets the app handle it instead.

    public static void DisableSystemViewActivationPolicy()public static void DisableSystemViewActivationPolicy()Public Static Function DisableSystemViewActivationPolicy() As void
  • PrepareForCustomAnimatedSwitchAsync(System.Int32,System.Int32,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions)
    PrepareForCustomAnimatedSwitchAsync(System.Int32,System.Int32,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions)
    PrepareForCustomAnimatedSwitchAsync(System.Int32,System.Int32,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions)
    PrepareForCustomAnimatedSwitchAsync(System.Int32,System.Int32,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions)

    Prepares your app to visually transition between two windows with a custom animation.

    public static IAsyncOperation<bool> PrepareForCustomAnimatedSwitchAsync(System.Int32 toViewId,System.Int32 fromViewId,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions options)public static IAsyncOperation<bool> PrepareForCustomAnimatedSwitchAsync(System.Int32 toViewId,System.Int32 fromViewId,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions options)Public Static Function PrepareForCustomAnimatedSwitchAsync(toViewId As System.Int32,fromViewId As System.Int32,options As Windows.UI.ViewManagement.ApplicationViewSwitchingOptions) As IAsyncOperation( Of bool )

    Parameters

    Returns

    • Asynchronously returns true if the call succeeds; false if it does not.

    Remarks

    The view ID can be obtained for the current app view with Id. For a specific app view managed by the app, call GetApplicationViewIdForWindow(Windows.UI.Core.ICoreWindow) with the CoreWindow for the app view.

  • SwitchAsync(System.Int32)
    SwitchAsync(System.Int32)
    SwitchAsync(System.Int32)
    SwitchAsync(System.Int32)

    Visually replaces the calling window (app view) with a specified window.

    public static IAsyncAction SwitchAsync(System.Int32 viewId)public static IAsyncAction SwitchAsync(System.Int32 viewId)Public Static Function SwitchAsync(viewId As System.Int32) As IAsyncAction

    Parameters

    • viewId
      System.Int32
      System.Int32
      System.Int32
      System.Int32

      The ID of the window under preparation for display.

    Returns

  • SwitchAsync(System.Int32,System.Int32)
    SwitchAsync(System.Int32,System.Int32)
    SwitchAsync(System.Int32,System.Int32)
    SwitchAsync(System.Int32,System.Int32)

    Visually replaces the calling window (app view) with a specified window.

    public static IAsyncAction SwitchAsync(System.Int32 toViewId,System.Int32 fromViewId)public static IAsyncAction SwitchAsync(System.Int32 toViewId,System.Int32 fromViewId)Public Static Function SwitchAsync(toViewId As System.Int32,fromViewId As System.Int32) As IAsyncAction

    Parameters

    • toViewId
      System.Int32
      System.Int32
      System.Int32
      System.Int32

      The ID of the window under preparation for display.

    • fromViewId
      System.Int32
      System.Int32
      System.Int32
      System.Int32

      The ID of the calling, currently displayed window.

    Returns

  • SwitchAsync(System.Int32,System.Int32,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions)
    SwitchAsync(System.Int32,System.Int32,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions)
    SwitchAsync(System.Int32,System.Int32,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions)
    SwitchAsync(System.Int32,System.Int32,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions)

    Visually replaces the calling window (app view) with a specified window.

    public static IAsyncAction SwitchAsync(System.Int32 toViewId,System.Int32 fromViewId,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions options)public static IAsyncAction SwitchAsync(System.Int32 toViewId,System.Int32 fromViewId,Windows.UI.ViewManagement.ApplicationViewSwitchingOptions options)Public Static Function SwitchAsync(toViewId As System.Int32,fromViewId As System.Int32,options As Windows.UI.ViewManagement.ApplicationViewSwitchingOptions) As IAsyncAction

    Parameters

    Returns

  • TryShowAsStandaloneAsync(System.Int32)
    TryShowAsStandaloneAsync(System.Int32)
    TryShowAsStandaloneAsync(System.Int32)
    TryShowAsStandaloneAsync(System.Int32)

    Displays another window (app view) for the app on the screen, adjacent to the original window

    public static IAsyncOperation<bool> TryShowAsStandaloneAsync(System.Int32 viewId)public static IAsyncOperation<bool> TryShowAsStandaloneAsync(System.Int32 viewId)Public Static Function TryShowAsStandaloneAsync(viewId As System.Int32) As IAsyncOperation( Of bool )

    Parameters

    • viewId
      System.Int32
      System.Int32
      System.Int32
      System.Int32

      The ID of the new window to display.

    Returns

    • Asynchronously returns true if the call succeeds; false if it does not.

    Remarks

    If this method succeeds, a new window is created next to the original window. It can only be called from an ASTA (core UI) thread.

    The new window has its own UI thread (ASTA) and associated CoreWindow. Developers should use thread-safe methods for communication between the windows, such as window.postMessage for JavaScript apps and the CoreDispatcher (Dispatcher ) messaging for C# and C++ developers.

  • TryShowAsStandaloneAsync(System.Int32,Windows.UI.ViewManagement.ViewSizePreference)
    TryShowAsStandaloneAsync(System.Int32,Windows.UI.ViewManagement.ViewSizePreference)
    TryShowAsStandaloneAsync(System.Int32,Windows.UI.ViewManagement.ViewSizePreference)
    TryShowAsStandaloneAsync(System.Int32,Windows.UI.ViewManagement.ViewSizePreference)

    Displays another window (app view) for the app on the screen, adjacent to the original window

    public static IAsyncOperation<bool> TryShowAsStandaloneAsync(System.Int32 viewId,Windows.UI.ViewManagement.ViewSizePreference sizePreference)public static IAsyncOperation<bool> TryShowAsStandaloneAsync(System.Int32 viewId,Windows.UI.ViewManagement.ViewSizePreference sizePreference)Public Static Function TryShowAsStandaloneAsync(viewId As System.Int32,sizePreference As Windows.UI.ViewManagement.ViewSizePreference) As IAsyncOperation( Of bool )

    Parameters

    Returns

    • Asynchronously returns true if the call succeeds; false if it does not.

    Remarks

    If this method succeeds, a new window is created next to the original window. It can only be called from an ASTA (core UI) thread.

    The new window has its own UI thread (ASTA) and associated CoreWindow. Developers should use thread-safe methods for communication between the windows, such as window.postMessage for JavaScript apps and the CoreDispatcher (Dispatcher ) messaging for C# and C++ developers.

  • TryShowAsStandaloneAsync(System.Int32,Windows.UI.ViewManagement.ViewSizePreference,System.Int32,Windows.UI.ViewManagement.ViewSizePreference)
    TryShowAsStandaloneAsync(System.Int32,Windows.UI.ViewManagement.ViewSizePreference,System.Int32,Windows.UI.ViewManagement.ViewSizePreference)
    TryShowAsStandaloneAsync(System.Int32,Windows.UI.ViewManagement.ViewSizePreference,System.Int32,Windows.UI.ViewManagement.ViewSizePreference)
    TryShowAsStandaloneAsync(System.Int32,Windows.UI.ViewManagement.ViewSizePreference,System.Int32,Windows.UI.ViewManagement.ViewSizePreference)

    Displays another window (app view) for the app on the screen, adjacent to the original window.

    public static IAsyncOperation<bool> TryShowAsStandaloneAsync(System.Int32 viewId,Windows.UI.ViewManagement.ViewSizePreference sizePreference,System.Int32 anchorViewId,Windows.UI.ViewManagement.ViewSizePreference anchorSizePreference)public static IAsyncOperation<bool> TryShowAsStandaloneAsync(System.Int32 viewId,Windows.UI.ViewManagement.ViewSizePreference sizePreference,System.Int32 anchorViewId,Windows.UI.ViewManagement.ViewSizePreference anchorSizePreference)Public Static Function TryShowAsStandaloneAsync(viewId As System.Int32,sizePreference As Windows.UI.ViewManagement.ViewSizePreference,anchorViewId As System.Int32,anchorSizePreference As Windows.UI.ViewManagement.ViewSizePreference) As IAsyncOperation( Of bool )

    Parameters

    Returns

    • Asynchronously returns true if the call succeeds; false if it does not.

    Remarks

    If this method succeeds, a new window is created next to the original window. It can only be called from an ASTA (core UI) thread.

    The new window has its own UI thread (ASTA) and associated CoreWindow. Developers should use thread-safe methods for communication between the windows, such as window.postMessage for JavaScript apps and the CoreDispatcher (Dispatcher ) messaging for C# and C++ developers.

  • TryShowAsViewModeAsync(System.Int32,Windows.UI.ViewManagement.ApplicationViewMode)
    TryShowAsViewModeAsync(System.Int32,Windows.UI.ViewManagement.ApplicationViewMode)
    TryShowAsViewModeAsync(System.Int32,Windows.UI.ViewManagement.ApplicationViewMode)
    TryShowAsViewModeAsync(System.Int32,Windows.UI.ViewManagement.ApplicationViewMode)

    Prerelease. Displays a view as a standalone view in the desired view mode.

    public static IAsyncOperation<bool> TryShowAsViewModeAsync(System.Int32 viewId,Windows.UI.ViewManagement.ApplicationViewMode viewMode)public static IAsyncOperation<bool> TryShowAsViewModeAsync(System.Int32 viewId,Windows.UI.ViewManagement.ApplicationViewMode viewMode)Public Static Function TryShowAsViewModeAsync(viewId As System.Int32,viewMode As Windows.UI.ViewManagement.ApplicationViewMode) As IAsyncOperation( Of bool )

    Parameters

    Returns

    • Asynchronously returns true if the call succeeds; false if it does not.

  • TryShowAsViewModeAsync(System.Int32,Windows.UI.ViewManagement.ApplicationViewMode,Windows.UI.ViewManagement.ViewModePreferences)
    TryShowAsViewModeAsync(System.Int32,Windows.UI.ViewManagement.ApplicationViewMode,Windows.UI.ViewManagement.ViewModePreferences)
    TryShowAsViewModeAsync(System.Int32,Windows.UI.ViewManagement.ApplicationViewMode,Windows.UI.ViewManagement.ViewModePreferences)
    TryShowAsViewModeAsync(System.Int32,Windows.UI.ViewManagement.ApplicationViewMode,Windows.UI.ViewManagement.ViewModePreferences)

    Prerelease. Displays a view as a standalone view in the desired view mode with the specified options.

    public static IAsyncOperation<bool> TryShowAsViewModeAsync(System.Int32 viewId,Windows.UI.ViewManagement.ApplicationViewMode viewMode,Windows.UI.ViewManagement.ViewModePreferences viewModePreferences)public static IAsyncOperation<bool> TryShowAsViewModeAsync(System.Int32 viewId,Windows.UI.ViewManagement.ApplicationViewMode viewMode,Windows.UI.ViewManagement.ViewModePreferences viewModePreferences)Public Static Function TryShowAsViewModeAsync(viewId As System.Int32,viewMode As Windows.UI.ViewManagement.ApplicationViewMode,viewModePreferences As Windows.UI.ViewManagement.ViewModePreferences) As IAsyncOperation( Of bool )

    Parameters

    Returns

    • Asynchronously returns true if the call succeeds; false if it does not.

Attributes

Windows.Foundation.Metadata.MuseAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.UI.ViewManagement.dll