The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

VideoBrush.SetSource Method (CaptureSource)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Sets the source of the VideoBrush using a video capture source

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

public void SetSource(
	CaptureSource source


Type: System.Windows.Media.CaptureSource
A CaptureSource corresponding to a camera on the device.

To display video from the camera, set the source video for a VideoBrush using a CaptureSource. For more information on obtaining a CaptureSource, see How to record video in a camera app for Windows Phone 8.

To display the camera preview, like what you would see in a camera viewfinder, use the SetSource method to apply the instantiated PhotoCamera object to the VideoBrush. For more information, see How to create a base camera app for Windows Phone 8.

This method also provides a simple playback capability for captured video such that it can easily be displayed without having to process individual frames of video or video formats. Other more advanced scenarios for using a video CaptureSource exist whereby you can access the raw video; for information on these scenarios, see VideoSink.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone