ProjectionManager ProjectionManager ProjectionManager ProjectionManager Class

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

Syntax

Declaration

public static class ProjectionManagerpublic static class ProjectionManagerPublic Static Class ProjectionManagerpublic static class ProjectionManager

Properties summary

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

Methods summary

Returns a string that is used to enumerate device services.

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

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

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

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

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

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.

Events summary

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

Properties

  • ProjectionDisplayAvailable
    ProjectionDisplayAvailable
    ProjectionDisplayAvailable
    ProjectionDisplayAvailable

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

    public static bool ProjectionDisplayAvailable { get; }public static bool ProjectionDisplayAvailable { get; }Public Static ReadOnly Property ProjectionDisplayAvailable As boolpublic static bool ProjectionDisplayAvailable { get; }

    Property Value

    • bool
      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 string GetDeviceSelector()public static string GetDeviceSelector()Public Static Function GetDeviceSelector() As stringpublic static string GetDeviceSelector()

    Returns

    • string
      string
      string
      string

      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<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 )public static IAsyncOperation<bool> RequestStartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, Rect selection)

    Parameters

    • projectionViewId
      System.Int32
      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
      System.Int32

      The ID of the original window before projection.

    • selection

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

    Returns

    • true if projection started; otherwise, false.

  • 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<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 )public static IAsyncOperation<bool> RequestStartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, Rect selection, Placement prefferedPlacement)

    Parameters

    • projectionViewId
      System.Int32
      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
      System.Int32

      The ID of the original window before projection.

    • selection

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

    • prefferedPlacement

      The side of the rectangle where the flyout should appear.

    Returns

    • true if projection started; otherwise, false.

  • 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(Int32 projectionViewId, Int32 anchorViewId)public static IAsyncAction StartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function StartProjectingAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncActionpublic static IAsyncAction StartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)

    Parameters

    • projectionViewId
      System.Int32
      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
      System.Int32

      The ID of the original window before projection.

    Returns

    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 Id. For a specific app view managed by the app, call GetApplicationViewIdForWindow(ICoreWindow) with the CoreWindow for the app view.

  • 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(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 IAsyncActionpublic static IAsyncAction StartProjectingAsync(Int32 projectionViewId, Int32 anchorViewId, DeviceInformation displayDeviceInfo)

    Parameters

    • projectionViewId
      System.Int32
      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
      System.Int32

      The ID of the original window before projection.

    • displayDeviceInfo

      Information about the display device.

    Returns

    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 Id. For a specific app view managed by the app, call GetApplicationViewIdForWindow(ICoreWindow) with the CoreWindow for the app view.

  • 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(Int32 projectionViewId, Int32 anchorViewId)public static IAsyncAction StopProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function StopProjectingAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncActionpublic static IAsyncAction StopProjectingAsync(Int32 projectionViewId, Int32 anchorViewId)

    Parameters

    • projectionViewId
      System.Int32
      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
      System.Int32

      The ID of the original window before projection.

    Returns

  • 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(Int32 projectionViewId, Int32 anchorViewId)public static IAsyncAction SwapDisplaysForViewsAsync(Int32 projectionViewId, Int32 anchorViewId)Public Static Function SwapDisplaysForViewsAsync(projectionViewId As Int32, anchorViewId As Int32) As IAsyncActionpublic static IAsyncAction SwapDisplaysForViewsAsync(Int32 projectionViewId, Int32 anchorViewId)

    Parameters

    • projectionViewId
      System.Int32
      System.Int32
      System.Int32
      System.Int32

      The ID of the window currently displayed by the projector.

    • anchorViewId
      System.Int32
      System.Int32
      System.Int32
      System.Int32

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

    Returns

Events

  • ProjectionDisplayAvailableChanged
    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 ProjectionDisplayAvailableChangedpublic static event EventHandler ProjectionDisplayAvailableChanged

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

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

Details

Assembly

Windows.UI.ViewManagement.dll