New to Telerik UI for WPF? Download free 30-day trial

Start the Camera

The RadWebCam control automatically connects to the first camera and recording device it finds. Then it selects the highest available resolution and starts the video.

Disable Auto Start

To disable the automatic start of the camera, set the AutoStart property to False. The default value is True.

Disable auto start

<telerik:RadWebCam AutoStart="False"/> 

To start the camera at a later moment in time, call the Start method of RadWebCam.

Starting the camera

this.radWebCam.Start(); 

Start Camera Manually

To start the camera manually, select a camera device, video format and recording device, and then call the Initialize method of RadWebCam. The following steps describe how to do this.

  1. Get the camera devices by calling the RadWebCam.GetVideoCaptureDevices static method.
  2. Get the video formats supported by the camera device by calling the RadWebCam.GetVideoFormats static methods.
  3. Initialize the camera control using the collected settings. To do this, call the Initialize method of RadWebCam.
  4. Start the webcam control by calling the Start method.

Starting the camera with manually set device and video format

ReadOnlyCollection<MediaFoundationDeviceInfo> videoDevices = RadWebCam.GetVideoCaptureDevices();             
ReadOnlyCollection<MediaFoundationVideoFormatInfo> videoFormats = RadWebCam.GetVideoFormats(videoDevices[0]); 
this.radWebCam.Initialize(videoDevices[0], videoFormats[0]); 
this.radWebCam.Start(); 
Optionally, you can select a different recording device by passing a new device to the Initialize method.

Starting the camera with manually set device, video format and audio format

ReadOnlyCollection<MediaFoundationDeviceInfo> videoDevices = RadWebCam.GetVideoCaptureDevices();             
ReadOnlyCollection<MediaFoundationVideoFormatInfo> videoFormats = RadWebCam.GetVideoFormats(videoDevices[0]); 
ReadOnlyCollection<MediaFoundationDeviceInfo> recordingDevices = RadWebCam.GetAudioCaptureDevices(); 
this.radWebCam.Initialize(videoDevices[0], videoFormats[0], recordingDevices[0]); 
this.radWebCam.Start(); 
Passing an empty recording device (null) to the Initialize method will disable the audio recording.

Read more about the capture devices in the Media Information article.

The manual initialization of RadWebCam should be executed after the control gets loaded. For example, you can use its Loaded event.

Stop the Camera

To stop the camera manually call the Stop method of RadWebCam.

To disconnect from the camera, call the ShutDown method.

Stopping the camera

this.radWebCam.Stop(); 

Shutdown the camera

this.radWebCam.ShutDown(); 

See Also

In this article