Projection​Manager Projection​Manager Projection​Manager Class

Definition

Defines a set of methods for managing the windows (app views) sent to secondary displays, such as projectors.

public static class ProjectionManagerpublic static class ProjectionManagerPublic Static Class ProjectionManager
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

ProjectionDisplayAvailable ProjectionDisplayAvailable ProjectionDisplayAvailable

Gets whether or not a projection display is available to use.

public static PlatForm::Boolean ProjectionDisplayAvailable { get; }public static bool ProjectionDisplayAvailable { get; }Public Static ReadOnly Property ProjectionDisplayAvailable As bool
Value
bool bool bool

true if a projection display is available on the current computer; false if it is not.

Attributes

Methods

GetDeviceSelector() GetDeviceSelector() GetDeviceSelector()

Returns a string that is used to enumerate device services.

public static PlatForm::String GetDeviceSelector()public static string GetDeviceSelector()Public Static Function GetDeviceSelector() As string
Returns
string string string

A string that is used to enumerate device services.

Attributes

RequestStartProjectingAsync(Int32, Int32, Rect) RequestStartProjectingAsync(Int32, Int32, Rect) RequestStartProjectingAsync(Int32, Int32, Rect)

Makes a request to asynchronously sends a window (app view) to the projector or other secondary display.

public static IAsyncOperation<bool> RequestStartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, Rect selection)public static IAsyncOperation<bool> RequestStartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, Rect selection)Public Static Function RequestStartProjectingAsync(projectionViewId As Int32, anchorViewId As Int32, selection As Rect) As IAsyncOperation( Of bool )
Parameters
projectionViewId
System.Int32 System.Int32 System.Int32

The new ID of the window to be displayed by the projector or other secondary display.

anchorViewId
System.Int32 System.Int32 System.Int32

The ID of the original window before projection.

selection
Rect Rect Rect

The area to one side of which the flyout is displayed.

Returns

true if projection started; otherwise, false.

Attributes

RequestStartProjectingAsync(Int32, Int32, Rect, Placement) RequestStartProjectingAsync(Int32, Int32, Rect, Placement) RequestStartProjectingAsync(Int32, Int32, Rect, Placement)

Makes a request to asynchronously sends a window (app view) to the projector or other secondary display with the specified preferred placement.

public static IAsyncOperation<bool> RequestStartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, Rect selection, Placement prefferedPlacement)public static IAsyncOperation<bool> RequestStartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, Rect selection, Placement prefferedPlacement)Public Static Function RequestStartProjectingAsync(projectionViewId As Int32, anchorViewId As Int32, selection As Rect, prefferedPlacement As Placement) As IAsyncOperation( Of bool )
Parameters
projectionViewId
System.Int32 System.Int32 System.Int32

The new ID of the window to be displayed by the projector or other secondary display.

anchorViewId
System.Int32 System.Int32 System.Int32

The ID of the original window before projection.

selection
Rect Rect Rect

The area to one side of which the flyout is displayed.

prefferedPlacement
Placement Placement Placement

The side of the rectangle where the flyout should appear.

Returns

true if projection started; otherwise, false.

Attributes

StartProjectingAsync(Int32, Int32) StartProjectingAsync(Int32, Int32) StartProjectingAsync(Int32, Int32)

Asynchronously sends a window (app view) to the projector or other secondary display.

public static IAsyncAction StartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)public static IAsyncAction StartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function StartProjectingAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncAction
Parameters
projectionViewId
System.Int32 System.Int32 System.Int32

The new ID of the window to be displayed by the projector or other secondary display.

anchorViewId
System.Int32 System.Int32 System.Int32

The ID of the original window before projection.

Returns

The asynchronous results of the operation. Use this to determine when the async call is complete.

Attributes

Remarks

If this method succeeds, an existing window (app view) is placed on a secondary display, if one is detected. Otherwise, the window is placed on the primary display. This window can only be accessed from an ASTA UI thread.

The moved window has its own ASTA UI thread and associated CoreWindow. Always use thread-safe methods, such as window.postMessage for JavaScript apps or the CoreDispatcher event messaging API for C# and C++ apps, when communicating between the windows.

Either the current app view window or the projection view window must be active for this call to succeed. The view ID can be obtained for the current app view with ApplicationView.Id. For a specific app view managed by the app, call ApplicationView.GetApplicationViewIdForWindow with the CoreWindow for the app view.

StartProjectingAsync(Int32, Int32, DeviceInformation) StartProjectingAsync(Int32, Int32, DeviceInformation) StartProjectingAsync(Int32, Int32, DeviceInformation)

Asynchronously sends a window (app view) to the projector or other secondary display, and provides info about the display.

public static IAsyncAction StartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, DeviceInformation displayDeviceInfo)public static IAsyncAction StartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, DeviceInformation displayDeviceInfo)Public Static Function StartProjectingAsync(projectionViewId As Int32, anchorViewId As Int32, displayDeviceInfo As DeviceInformation) As IAsyncAction
Parameters
projectionViewId
System.Int32 System.Int32 System.Int32

The new ID of the window to be displayed by the projector or other secondary display.

anchorViewId
System.Int32 System.Int32 System.Int32

The ID of the original window before projection.

displayDeviceInfo
DeviceInformation DeviceInformation DeviceInformation

Information about the display device.

Returns

The asynchronous results of the operation. Use this to determine when the async call is complete.

Attributes

Remarks

If this method succeeds, an existing window (app view) is placed on a secondary display, if one is detected. Otherwise, the window is placed on the primary display. This window can only be accessed from an ASTA UI thread.

The moved window has its own ASTA UI thread and associated CoreWindow. Always use thread-safe methods, such as window.postMessage for JavaScript apps or the CoreDispatcher event messaging API for C# and C++ apps, when communicating between the windows.

Either the current app view window or the projection view window must be active for this call to succeed. The view ID can be obtained for the current app view with ApplicationView.Id. For a specific app view managed by the app, call ApplicationView.GetApplicationViewIdForWindow with the CoreWindow for the app view.

StopProjectingAsync(Int32, Int32) StopProjectingAsync(Int32, Int32) StopProjectingAsync(Int32, Int32)

Asynchronously hides a window (app view) displayed by a projector or other secondary display.

public static IAsyncAction StopProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)public static IAsyncAction StopProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function StopProjectingAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncAction
Parameters
projectionViewId
System.Int32 System.Int32 System.Int32

The ID of the window currently displayed by the projector or other secondary display.

anchorViewId
System.Int32 System.Int32 System.Int32

The ID of the original window before projection.

Returns

The asynchronous results of the operation. Use this to determine when the async call is complete.

Attributes

SwapDisplaysForViewsAsync(Int32, Int32) SwapDisplaysForViewsAsync(Int32, Int32) SwapDisplaysForViewsAsync(Int32, Int32)

Asynchronously swaps the calling window (app view) with the window displayed on the projector or other secondary display. The result is that the calling window is displayed on the projector, and the formerly projected window is displayed on the device screen.

public static IAsyncAction SwapDisplaysForViewsAsync(Int32 projectionViewId, Int32 anchorViewId)public static IAsyncAction SwapDisplaysForViewsAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function SwapDisplaysForViewsAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncAction
Parameters
projectionViewId
System.Int32 System.Int32 System.Int32

The ID of the window currently displayed by the projector.

anchorViewId
System.Int32 System.Int32 System.Int32

The ID of the window to swap with the projected window.

Returns

The asynchronous results of the operation. Use this to determine when the async call is complete.

Attributes

Events

ProjectionDisplayAvailableChanged ProjectionDisplayAvailableChanged ProjectionDisplayAvailableChanged

Occurs when a projector or other secondary display becomes available or unavailable.

public static event EventHandler ProjectionDisplayAvailableChangedpublic static event EventHandler ProjectionDisplayAvailableChangedPublic Static Event ProjectionDisplayAvailableChanged
Attributes

See Also