ProjectionManager
ProjectionManager
ProjectionManager
ProjectionManager
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// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Properties
ProjectionDisplayAvailable 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// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
true if a projection display is available on the current computer; false if it is not.
Methods
GetDeviceSelector() 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// You can use this method in JavaScript.
A string that is used to enumerate device services.
RequestStartProjectingAsync(Int32, Int32, Rect) 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<PlatForm::Boolean> RequestStartProjectingAsync(int projectionViewId, int 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 )// You can use this method in JavaScript.
- projectionViewId
- int Int32 Int32 Int32
The new ID of the window to be displayed by the projector or other secondary display.
- anchorViewId
- int Int32 Int32 Int32
The ID of the original window before projection.
true if projection started; otherwise, false.
- See Also
RequestStartProjectingAsync(Int32, Int32, Rect, Placement) 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<PlatForm::Boolean> RequestStartProjectingAsync(int projectionViewId, int 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 )// You can use this method in JavaScript.
- projectionViewId
- int Int32 Int32 Int32
The new ID of the window to be displayed by the projector or other secondary display.
- anchorViewId
- int Int32 Int32 Int32
The ID of the original window before projection.
The side of the rectangle where the flyout should appear.
true if projection started; otherwise, false.
- See Also
StartProjectingAsync(Int32, Int32) 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(int projectionViewId, int anchorViewId)public static IAsyncAction StartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function StartProjectingAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncAction// You can use this method in JavaScript.
- projectionViewId
- int Int32 Int32 Int32
The new ID of the window to be displayed by the projector or other secondary display.
- anchorViewId
- int Int32 Int32 Int32
The ID of the original window before projection.
The asynchronous results of the operation. Use this to determine when the async call is complete.
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.
- See Also
StartProjectingAsync(Int32, Int32, DeviceInformation) 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(int projectionViewId, int 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// You can use this method in JavaScript.
- projectionViewId
- int Int32 Int32 Int32
The new ID of the window to be displayed by the projector or other secondary display.
- anchorViewId
- int Int32 Int32 Int32
The ID of the original window before projection.
- displayDeviceInfo
- DeviceInformation DeviceInformation DeviceInformation DeviceInformation
Information about the display device.
The asynchronous results of the operation. Use this to determine when the async call is complete.
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.
- See Also
StopProjectingAsync(Int32, Int32) 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(int projectionViewId, int anchorViewId)public static IAsyncAction StopProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function StopProjectingAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncAction// You can use this method in JavaScript.
- projectionViewId
- int Int32 Int32 Int32
The ID of the window currently displayed by the projector or other secondary display.
- anchorViewId
- int Int32 Int32 Int32
The ID of the original window before projection.
The asynchronous results of the operation. Use this to determine when the async call is complete.
SwapDisplaysForViewsAsync(Int32, Int32) 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(int projectionViewId, int anchorViewId)public static IAsyncAction SwapDisplaysForViewsAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function SwapDisplaysForViewsAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncAction// You can use this method in JavaScript.
- projectionViewId
- int Int32 Int32 Int32
The ID of the window currently displayed by the projector.
- anchorViewId
- int Int32 Int32 Int32
The ID of the window to swap with the projected window.
The asynchronous results of the operation. Use this to determine when the async call is complete.
Events
ProjectionDisplayAvailableChanged ProjectionDisplayAvailableChanged ProjectionDisplayAvailableChanged ProjectionDisplayAvailableChanged
Occurs when a projector or other secondary display becomes available or unavailable.
public : static event EventHandler ProjectionDisplayAvailableChanged<object>public static event EventHandler ProjectionDisplayAvailableChanged<object>Public Static Event ProjectionDisplayAvailableChanged<object>// You can use this event in JavaScript.