CaptureElement.Source Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.