Windows Dev Center

ApplicationViewSwitcher.TryShowAsStandaloneAsync(Int32, ViewSizePreference, Int32, ViewSizePreference) | tryShowAsStandaloneAsync(Int32, ViewSizePreference, Int32, ViewSizePreference) method

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

Syntax


Windows.UI.ViewManagement.ApplicationViewSwitcher.tryShowAsStandaloneAsync(viewId, sizePreference, anchorViewId, anchorSizePreference).done( /* Your success and error handlers */ );

Parameters

viewId

Type: Number [JavaScript] | System.Int32 [.NET] | int32 [C++]

The ID of the new window to display.

sizePreference

Type: ViewSizePreference

The preferred general sizing of the new window.

anchorViewId

Type: Number [JavaScript] | System.Int32 [.NET] | int32 [C++]

The ID of the calling (anchor) window.

anchorSizePreference

Type: ViewSizePreference

The preferred new general sizing of the calling window if this call succeeds.

Return value

Type: IAsyncOperation<Boolean>

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 (CoreWindow.Dispatcher) messaging for C# and C++ developers.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.ViewManagement
Windows::UI::ViewManagement [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

Windows.UI.ViewManagement
Windows::UI::ViewManagement [C++]

Metadata

Windows.winmd

See also

ApplicationViewSwitcher
TryShowAsStandaloneAsync(Int32)
TryShowAsStandaloneAsync(Int32, ViewSizePreference)

 

 

Show:
© 2015 Microsoft