Class
RadWebCam

Represents a web cam control that displays the stream provided by a web cam.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Media.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Media")]
public class RadWebCam : Control, IDisposable

Inheritance: objectRadWebCam

Implements: IDisposable

Constructors

RadWebCam()

Initializes a new instance of the RadWebCam class.

Declaration

cs-api-definition
public RadWebCam()

Fields

AutoStartProperty

Identifies the AutoStart dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AutoStartProperty

Field Value

DependencyProperty

CameraErrorContentProperty

Identifies the CameraErrorContent dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CameraErrorContentProperty

Field Value

DependencyProperty

CameraErrorContentTemplateProperty

Identifies the CameraErrorContentTemplate dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CameraErrorContentTemplateProperty

Field Value

DependencyProperty

CameraErrorEvent

Registers the CameraError routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent CameraErrorEvent

Field Value

RoutedEvent

FlipHorizontallyProperty

Identifies the FlipHorizontally dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty FlipHorizontallyProperty

Field Value

DependencyProperty

FlipVerticallyProperty

Identifies the FlipVertically dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty FlipVerticallyProperty

Field Value

DependencyProperty

HasErrorProperty

Identifies the HasError dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HasErrorProperty

Field Value

DependencyProperty

IsPreviewingSnapshotProperty

Identifies the IsPreviewingSnapshot dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsPreviewingSnapshotProperty

Field Value

DependencyProperty

IsRecordingProperty

Identifies the IsRecording dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsRecordingProperty

Field Value

DependencyProperty

PreviewSnapshotsProperty

Identifies the PreviewSnapshots dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PreviewSnapshotsProperty

Field Value

DependencyProperty

RecordingButtonVisibilityProperty

Identifies the RecordingButtonVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RecordingButtonVisibilityProperty

Field Value

DependencyProperty

RecordingEndedEvent

Registers the RecordingEnded routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent RecordingEndedEvent

Field Value

RoutedEvent

RecordingFilePathProperty

Identifies the RecordingFilePath dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RecordingFilePathProperty

Field Value

DependencyProperty

RecordingLabelVisibilityProperty

Identifies the RecordingLabelVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty RecordingLabelVisibilityProperty

Field Value

DependencyProperty

RecordingStartedEvent

Registers the RecordingStarted routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent RecordingStartedEvent

Field Value

RoutedEvent

SettingsButtonVisibilityProperty

Identifies the SettingsButtonVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SettingsButtonVisibilityProperty

Field Value

DependencyProperty

ShowAudioSettingsProperty

Identifies the ShowAudioSettings dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ShowAudioSettingsProperty

Field Value

DependencyProperty

SnapshotButtonVisibilityProperty

Identifies the SnapshotButtonVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SnapshotButtonVisibilityProperty

Field Value

DependencyProperty

SnapshotTakenEvent

Registers the SnapshotTaken routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent SnapshotTakenEvent

Field Value

RoutedEvent

ToolbarPanelVisibilityProperty

Identifies the ToolbarPanelVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ToolbarPanelVisibilityProperty

Field Value

DependencyProperty

VideoRecordingElapsedTimeFormatProperty

Identifies the VideoRecordingElapsedTimeFormat dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty VideoRecordingElapsedTimeFormatProperty

Field Value

DependencyProperty

VideoRecordingElapsedTimeTextProperty

Identifies the VideoRecordingElapsedTimeText dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty VideoRecordingElapsedTimeTextProperty

Field Value

DependencyProperty

Properties

AutoStart

Gets or sets whether the control will start the first webcam it finds upon starting the application.

Declaration

cs-api-definition
public bool AutoStart { get; set; }

Property Value

bool

CameraErrorContent

Gets a value indicating the content of the error message.

Declaration

cs-api-definition
public object CameraErrorContent { get; }

Property Value

object

CameraErrorContentTemplate

Gets or sets the DataTemplate that defines the visual tree of the ContentPresenter instance that visualizes the property.

Declaration

cs-api-definition
public DataTemplate CameraErrorContentTemplate { get; set; }

Property Value

DataTemplate

FlipHorizontally

Gets or sets whether the control will flip the incoming video feed horizontally.

Declaration

cs-api-definition
public bool FlipHorizontally { get; set; }

Property Value

bool

FlipVertically

Gets or sets whether the control will flip the incoming video feed vertically.

Declaration

cs-api-definition
public bool FlipVertically { get; set; }

Property Value

bool

HasError

Gets a value indicating whether the camera is in an error state.

Declaration

cs-api-definition
public bool HasError { get; }

Property Value

bool

IsPreviewingSnapshot

Gets a value indicating whether the control is in snapshot preview mode.

Declaration

cs-api-definition
public bool IsPreviewingSnapshot { get; }

Property Value

bool

IsRecording

Gets or sets a value indicating whether the source content is being recorded to a file.

Declaration

cs-api-definition
public bool IsRecording { get; set; }

Property Value

bool

PreviewSnapshots

Gets or sets whether the control will go into preview mode when a snapshot is taken.

Declaration

cs-api-definition
public bool PreviewSnapshots { get; set; }

Property Value

bool

RecordingButtonVisibility

Gets or sets the visibility of the Toggle Recording button.

Declaration

cs-api-definition
public Visibility RecordingButtonVisibility { get; set; }

Property Value

Visibility

RecordingFilePath

Gets or sets the location where video files are stored when capturing.

Declaration

cs-api-definition
public string RecordingFilePath { get; set; }

Property Value

string

RecordingLabelVisibility

Gets or sets the visibility of the label displaying the elapsed time while recording.

Declaration

cs-api-definition
public Visibility RecordingLabelVisibility { get; set; }

Property Value

Visibility

SettingsButtonVisibility

Gets or sets the visibility of the Settings button.

Declaration

cs-api-definition
public Visibility SettingsButtonVisibility { get; set; }

Property Value

Visibility

ShowAudioSettings

Gets or sets whether the settings dialog will include an Audio tab for controlling mic settings.

Declaration

cs-api-definition
public bool ShowAudioSettings { get; set; }

Property Value

bool

SnapshotButtonVisibility

Gets or sets the visibility of the Take Snapshot button.

Declaration

cs-api-definition
public Visibility SnapshotButtonVisibility { get; set; }

Property Value

Visibility

ToolbarPanelVisibility

Gets or sets the visibility of the Toolbar panel that hosts all the camera built-in controls.

Declaration

cs-api-definition
public Visibility ToolbarPanelVisibility { get; set; }

Property Value

Visibility

VideoRecordingElapsedTimeFormat

Gets or sets the format of the elapsed time displayed during recording.

Declaration

cs-api-definition
public string VideoRecordingElapsedTimeFormat { get; set; }

Property Value

string

VideoRecordingElapsedTimeText

Gets or sets a value indicating for how long a video recording has been running.

Declaration

cs-api-definition
public string VideoRecordingElapsedTimeText { get; }

Property Value

string

Methods

DiscardSnapshot()

Discards the snapshot that is currently being previewed. PreviewSnapshots must be set to true and the control must be previewing a snapshot triggered by calling TakeSnapshot().

Declaration

cs-api-definition
public void DiscardSnapshot()

Dispose()

Called when the control is destroyed.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

Called when the control is destroyed.

Declaration

cs-api-definition
protected virtual void Dispose(bool disposing)

Parameters

disposing

bool

Finalize()

Releases unmanaged resources and performs other cleanup operations before the RadWebCam is reclaimed by garbage collection.

Declaration

cs-api-definition
[SuppressMessage("Design", "CA1063:Implement IDisposable Correctly", Justification = "<Pending>")]
protected override void Finalize()

GetAudioCaptureDevices()

Gets a list with all the available audio capture devices.

Declaration

cs-api-definition
public static ReadOnlyCollection<MediaFoundationDeviceInfo> GetAudioCaptureDevices()

Returns

ReadOnlyCollection<MediaFoundationDeviceInfo>

GetVideoCaptureDevices()

Gets a list with all the available video capture devices.

Declaration

cs-api-definition
public static ReadOnlyCollection<MediaFoundationDeviceInfo> GetVideoCaptureDevices()

Returns

ReadOnlyCollection<MediaFoundationDeviceInfo>

GetVideoFormats(MediaFoundationDeviceInfo, bool)

Gets a list with all the available video file formats for the provided device.

Declaration

cs-api-definition
public static ReadOnlyCollection<MediaFoundationVideoFormatInfo> GetVideoFormats(MediaFoundationDeviceInfo device, bool recordingFormatsOnly = false)

Parameters

device

MediaFoundationDeviceInfo

The device for which to get the available formats.

recordingFormatsOnly

bool

If set to true - only formats that allow saving to a video file will be returned.

Returns

ReadOnlyCollection<MediaFoundationVideoFormatInfo>

Initialize(MediaFoundationDeviceInfo, MediaFoundationVideoFormatInfo)

Starts up the video pipeline and displays the video from the source inside of the control.

The device to use as a video source. The format from the video source.

Declaration

cs-api-definition
public void Initialize(MediaFoundationDeviceInfo videoDevice, MediaFoundationVideoFormatInfo videoFormat)

Parameters

videoDevice

MediaFoundationDeviceInfo

videoFormat

MediaFoundationVideoFormatInfo

Initialize(MediaFoundationDeviceInfo, MediaFoundationVideoFormatInfo, MediaFoundationDeviceInfo)

Starts up the video pipeline and displays the video from the source inside of the control.

The device to use as a video source. The format from the video source. The device to use as a audio source.

Declaration

cs-api-definition
public void Initialize(MediaFoundationDeviceInfo videoDevice, MediaFoundationVideoFormatInfo videoFormat, MediaFoundationDeviceInfo audioDevice)

Parameters

videoDevice

MediaFoundationDeviceInfo

videoFormat

MediaFoundationVideoFormatInfo

audioDevice

MediaFoundationDeviceInfo

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call .

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCameraError(CameraErrorEventArgs)

Fires the CameraError event.

Declaration

cs-api-definition
protected virtual void OnCameraError(CameraErrorEventArgs e)

Parameters

e

CameraErrorEventArgs

The event arguments.

OnCreateAutomationPeer()

Returns class-specific AutomationPeer.

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

The type-specific AutomationPeer implementation.

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnRecordingEnded(RadRoutedEventArgs)

Fires the RecordingEnded event.

Declaration

cs-api-definition
protected virtual void OnRecordingEnded(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The event arguments.

OnRecordingStarted(RadRoutedEventArgs)

Fires the RecordingStarted event.

Declaration

cs-api-definition
protected virtual void OnRecordingStarted(RadRoutedEventArgs e)

Parameters

e

RadRoutedEventArgs

The event arguments.

OnSnapshotTaken(SnapshotTakenEventArgs)

Fires the SnapshotTaken event.

Declaration

cs-api-definition
protected virtual void OnSnapshotTaken(SnapshotTakenEventArgs e)

Parameters

e

SnapshotTakenEventArgs

The event arguments.

Pause()

Pauses the video pipeline and pauses displaying the video feed.

Declaration

cs-api-definition
public void Pause()

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

SaveSnapshot()

Saves the snapshot that is currently being previewed. PreviewSnapshots must be set to true and the control must be previewing a snapshot triggered by calling TakeSnapshot().

Declaration

cs-api-definition
public void SaveSnapshot()

ShutDown()

Shuts down the media session and the recording.

Declaration

cs-api-definition
public void ShutDown()

Start()

Starts the video pipeline and starts displaying the video feed.

Declaration

cs-api-definition
public void Start()

StartRecording()

Starts capturing the media source(s) to a file. The RecordingFilePath property must be set before calling this method.

Declaration

cs-api-definition
public void StartRecording()

Stop()

Stops the video pipeline and stops displaying the video feed.

Declaration

cs-api-definition
public void Stop()

StopRecording()

Stops the file capture.

Declaration

cs-api-definition
public void StopRecording()

TakeSnapshot()

Takes a snapshot from the currently displayed video feed. To get the snapshot subscribe to the SnapshotTaken event.

Declaration

cs-api-definition
public void TakeSnapshot()

Events

CameraError

Occurs when an error is preventing the camera from operating normally.

Declaration

cs-api-definition
public event CameraErrorEventHandler CameraError

Event Value

CameraErrorEventHandler

RecordingEnded

Occurs when video recording has ended.

Declaration

cs-api-definition
public event RoutedEventHandler RecordingEnded

Event Value

RoutedEventHandler

RecordingStarted

Occurs when video recording is started.

Declaration

cs-api-definition
public event RecordingStartedEventHandler RecordingStarted

Event Value

RecordingStartedEventHandler

SnapshotTaken

Occurs when a snapshot is taken. If PreviewSnapshots is set to true the event is fired only if the SaveSnapshot command is executed.

Declaration

cs-api-definition
public event SnapshotTakenEventHandler SnapshotTaken

Event Value

SnapshotTakenEventHandler

In this article
DefinitionConstructorsRadWebCam()FieldsAutoStartPropertyCameraErrorContentPropertyCameraErrorContentTemplatePropertyCameraErrorEventFlipHorizontallyPropertyFlipVerticallyPropertyHasErrorPropertyIsPreviewingSnapshotPropertyIsRecordingPropertyPreviewSnapshotsPropertyRecordingButtonVisibilityPropertyRecordingEndedEventRecordingFilePathPropertyRecordingLabelVisibilityPropertyRecordingStartedEventSettingsButtonVisibilityPropertyShowAudioSettingsPropertySnapshotButtonVisibilityPropertySnapshotTakenEventToolbarPanelVisibilityPropertyVideoRecordingElapsedTimeFormatPropertyVideoRecordingElapsedTimeTextPropertyPropertiesAutoStartCameraErrorContentCameraErrorContentTemplateFlipHorizontallyFlipVerticallyHasErrorIsPreviewingSnapshotIsRecordingPreviewSnapshotsRecordingButtonVisibilityRecordingFilePathRecordingLabelVisibilitySettingsButtonVisibilityShowAudioSettingsSnapshotButtonVisibilityToolbarPanelVisibilityVideoRecordingElapsedTimeFormatVideoRecordingElapsedTimeTextMethodsDiscardSnapshot()Dispose()Dispose(bool)Finalize()GetAudioCaptureDevices()GetVideoCaptureDevices()GetVideoFormats(MediaFoundationDeviceInfo, bool)Initialize(MediaFoundationDeviceInfo, MediaFoundationVideoFormatInfo)Initialize(MediaFoundationDeviceInfo, MediaFoundationVideoFormatInfo, MediaFoundationDeviceInfo)OnApplyTemplate()OnCameraError(CameraErrorEventArgs)OnCreateAutomationPeer()OnInitialized(EventArgs)OnRecordingEnded(RadRoutedEventArgs)OnRecordingStarted(RadRoutedEventArgs)OnSnapshotTaken(SnapshotTakenEventArgs)Pause()ResetTheme()SaveSnapshot()ShutDown()Start()StartRecording()Stop()StopRecording()TakeSnapshot()EventsCameraErrorRecordingEndedRecordingStartedSnapshotTaken
Not finding the help you need?
Contact Support