Aracılığıyla paylaş


CaptureElement.Source Property

Definition

Gets or sets the source MediaCapture that this CaptureElement represents.

public:
 property MediaCapture ^ Source { MediaCapture ^ get(); void set(MediaCapture ^ value); };
MediaCapture Source();

void Source(MediaCapture value);
public MediaCapture Source { get; set; }
var mediaCapture = captureElement.source;
captureElement.source = mediaCapture;
Public Property Source As MediaCapture

Property Value

The source MediaCapture

Remarks

This property should not be set in XAML, because XAML represents initial state, and there is no good way to reference a MediaCapture through XAML resources. Initializing a MediaCapture is typically done by async operations or only when a capture is about to begin.

Important

You should always set the Source property to null when you are shutting down media capture in your app. For more information on properly cleaning up media capture resources, see Capture photos and video with MediaCapture.

Applies to