Udostępnij za pośrednictwem


MediaCaptureRelativePanelWatcher Class

Definition

Monitors the panel associated with a DisplayRegion, so that the app receives notifications when the relative location of the panel changes.

public ref class MediaCaptureRelativePanelWatcher sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 655360)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class MediaCaptureRelativePanelWatcher final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 655360)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class MediaCaptureRelativePanelWatcher : System.IDisposable
Public NotInheritable Class MediaCaptureRelativePanelWatcher
Implements IDisposable
Inheritance
Object Platform::Object IInspectable MediaCaptureRelativePanelWatcher
Attributes
Implements

Windows requirements

Device family
Windows 10, version 2004 (introduced in 10.0.19041.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v10.0)

Remarks

This API is intended for camera-based scenarios on hinged devices for which the relative location of a display region can change at runtime, allowing apps to modify their camera capture behavior dynamically.

Get an instance of this class by calling MediaCapture.CreateRelativePanelWatcher.

Properties

RelativePanel

Gets the relative panel that the MediaCaptureRelativePanelWatcher monitors for changes.

Methods

Close()

Closes the relative panel watcher and disposes of associated resources.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Start()

Starts the MediaCaptureRelativePanelWatcher monitoring of the relative panel location of the associated DisplayRegion.

Stop()

Stops the MediaCaptureRelativePanelWatcher monitoring of the relative panel location of the associated DisplayRegion.

Events

Changed

Raised when the relative location of the panel being monitored by the MediaCaptureRelativePanelWatcher changes.

Applies to

See also

  • <xref:Windows.Media.Capture.MediaCapture.CreateRelativePanelWatcher(Windows.Media.Capture.StreamingCaptureMode%2cWindows.UI.WindowManagement.DisplayRegion)%0a%5bDisplayRegion%5d(%2fuwp%2fapi%2fwindows.ui.windowmanagement.displayregion)>