Class RadWebCam
Represents a web cam control that displays the stream provided by a web cam.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.Media.dll
Syntax
[TelerikToolboxCategory("Media")]
public class RadWebCam : Control, IThemable, IDisposable
Constructors
RadWebCam()
Initializes a new instance of the RadWebCam class.
Declaration
public RadWebCam()
Fields
AutoStartProperty
Identifies the Auto
Declaration
public static readonly DependencyProperty AutoStartProperty
Field Value
System.
|
CameraErrorContentProperty
Identifies the Camera
Declaration
public static readonly DependencyProperty CameraErrorContentProperty
Field Value
System.
|
CameraErrorContentTemplateProperty
Identifies the Camera
Declaration
public static readonly DependencyProperty CameraErrorContentTemplateProperty
Field Value
System.
|
CameraErrorEvent
Registers the Camera
Declaration
public static readonly RoutedEvent CameraErrorEvent
Field Value
System.
|
FlipHorizontallyProperty
Identifies the Flip
Declaration
public static readonly DependencyProperty FlipHorizontallyProperty
Field Value
System.
|
FlipVerticallyProperty
Identifies the Flip
Declaration
public static readonly DependencyProperty FlipVerticallyProperty
Field Value
System.
|
HasErrorProperty
Identifies the Has
Declaration
public static readonly DependencyProperty HasErrorProperty
Field Value
System.
|
IsPreviewingSnapshotProperty
Identifies the Is
Declaration
public static readonly DependencyProperty IsPreviewingSnapshotProperty
Field Value
System.
|
IsRecordingProperty
Identifies the Is
Declaration
public static readonly DependencyProperty IsRecordingProperty
Field Value
System.
|
PreviewSnapshotsProperty
Identifies the Preview
Declaration
public static readonly DependencyProperty PreviewSnapshotsProperty
Field Value
System.
|
RecordingButtonVisibilityProperty
Identifies the Recording
Declaration
public static readonly DependencyProperty RecordingButtonVisibilityProperty
Field Value
System.
|
RecordingEndedEvent
Registers the Recording
Declaration
public static readonly RoutedEvent RecordingEndedEvent
Field Value
System.
|
RecordingFilePathProperty
Identifies the Recording
Declaration
public static readonly DependencyProperty RecordingFilePathProperty
Field Value
System.
|
RecordingLabelVisibilityProperty
Identifies the Recording
Declaration
public static readonly DependencyProperty RecordingLabelVisibilityProperty
Field Value
System.
|
RecordingStartedEvent
Registers the Recording
Declaration
public static readonly RoutedEvent RecordingStartedEvent
Field Value
System.
|
SettingsButtonVisibilityProperty
Identifies the Settings
Declaration
public static readonly DependencyProperty SettingsButtonVisibilityProperty
Field Value
System.
|
ShowAudioSettingsProperty
Identifies the Show
Declaration
public static readonly DependencyProperty ShowAudioSettingsProperty
Field Value
System.
|
SnapshotButtonVisibilityProperty
Identifies the Snapshot
Declaration
public static readonly DependencyProperty SnapshotButtonVisibilityProperty
Field Value
System.
|
SnapshotTakenEvent
Registers the Snapshot
Declaration
public static readonly RoutedEvent SnapshotTakenEvent
Field Value
System.
|
ToolbarPanelVisibilityProperty
Identifies the Toolbar
Declaration
public static readonly DependencyProperty ToolbarPanelVisibilityProperty
Field Value
System.
|
VideoRecordingElapsedTimeFormatProperty
Identifies the Video
Declaration
public static readonly DependencyProperty VideoRecordingElapsedTimeFormatProperty
Field Value
System.
|
VideoRecordingElapsedTimeTextProperty
Identifies the Video
Declaration
public static readonly DependencyProperty VideoRecordingElapsedTimeTextProperty
Field Value
System.
|
Properties
AutoStart
Gets or sets whether the control will start the first webcam it finds upon starting the application.
Declaration
public bool AutoStart { get; set; }
Property Value
System.
|
CameraErrorContent
Gets a value indicating the content of the error message.
Declaration
public object CameraErrorContent { get; }
Property Value
System.
|
CameraErrorContentTemplate
Gets or sets the System.
Declaration
public DataTemplate CameraErrorContentTemplate { get; set; }
Property Value
System.
|
FlipHorizontally
Gets or sets whether the control will flip the incoming video feed horizontally.
Declaration
public bool FlipHorizontally { get; set; }
Property Value
System.
|
FlipVertically
Gets or sets whether the control will flip the incoming video feed vertically.
Declaration
public bool FlipVertically { get; set; }
Property Value
System.
|
HasError
Gets a value indicating whether the camera is in an error state.
Declaration
public bool HasError { get; }
Property Value
System.
|
IsPreviewingSnapshot
Gets a value indicating whether the control is in snapshot preview mode.
Declaration
public bool IsPreviewingSnapshot { get; }
Property Value
System.
|
IsRecording
Gets or sets a value indicating whether the source content is being recorded to a file.
Declaration
public bool IsRecording { get; set; }
Property Value
System.
|
PreviewSnapshots
Gets or sets whether the control will go into preview mode when a snapshot is taken.
Declaration
public bool PreviewSnapshots { get; set; }
Property Value
System.
|
RecordingButtonVisibility
Gets or sets the visibility of the Toggle Recording button.
Declaration
public Visibility RecordingButtonVisibility { get; set; }
Property Value
System.
|
RecordingFilePath
Gets or sets the location where video files are stored when capturing.
Declaration
public string RecordingFilePath { get; set; }
Property Value
System.
|
RecordingLabelVisibility
Gets or sets the visibility of the label displaying the elapsed time while recording.
Declaration
public Visibility RecordingLabelVisibility { get; set; }
Property Value
System.
|
SettingsButtonVisibility
Gets or sets the visibility of the Settings button.
Declaration
public Visibility SettingsButtonVisibility { get; set; }
Property Value
System.
|
ShowAudioSettings
Gets or sets whether the settings dialog will include an Audio tab for controlling mic settings.
Declaration
public bool ShowAudioSettings { get; set; }
Property Value
System.
|
SnapshotButtonVisibility
Gets or sets the visibility of the Take Snapshot button.
Declaration
public Visibility SnapshotButtonVisibility { get; set; }
Property Value
System.
|
ToolbarPanelVisibility
Gets or sets the visibility of the Toolbar panel that hosts all the camera built-in controls.
Declaration
public Visibility ToolbarPanelVisibility { get; set; }
Property Value
System.
|
VideoRecordingElapsedTimeFormat
Gets or sets the format of the elapsed time displayed during recording.
Declaration
public string VideoRecordingElapsedTimeFormat { get; set; }
Property Value
System.
|
VideoRecordingElapsedTimeText
Gets or sets a value indicating for how long a video recording has been running.
Declaration
public string VideoRecordingElapsedTimeText { get; }
Property Value
System.
|
Methods
add_CameraError(CameraErrorEventHandler)
Declaration
public void add_CameraError(CameraErrorEventHandler value)
Parameters
Camera
|
add_RecordingStarted(RecordingStartedEventHandler)
Declaration
public void add_RecordingStarted(RecordingStartedEventHandler value)
Parameters
add_SnapshotTaken(SnapshotTakenEventHandler)
Declaration
public void add_SnapshotTaken(SnapshotTakenEventHandler value)
Parameters
DiscardSnapshot()
Discards the snapshot that is currently being previewed. Preview
Declaration
public void DiscardSnapshot()
Dispose()
Called when the control is destroyed.
Declaration
public void Dispose()
Dispose(Boolean)
Called when the control is destroyed.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
System.
|
Finalize()
Releases unmanaged resources and performs other cleanup operations before the
Rad
Declaration
protected override void Finalize()
GetAudioCaptureDevices()
Gets a list with all the available audio capture devices.
Declaration
public static ReadOnlyCollection<MediaFoundationDeviceInfo> GetAudioCaptureDevices()
Returns
System.
|
GetVideoCaptureDevices()
Gets a list with all the available video capture devices.
Declaration
public static ReadOnlyCollection<MediaFoundationDeviceInfo> GetVideoCaptureDevices()
Returns
System.
|
GetVideoFormats(MediaFoundationDeviceInfo, Boolean)
Gets a list with all the available video file formats for the provided device.
Declaration
public static ReadOnlyCollection<MediaFoundationVideoFormatInfo> GetVideoFormats(MediaFoundationDeviceInfo device, bool recordingFormatsOnly = false)
Parameters
Media The device for which to get the available formats. |
System. If set to true - only formats that allow saving to a video file will be returned. |
Returns
System.
|
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
public void Initialize(MediaFoundationDeviceInfo videoDevice, MediaFoundationVideoFormatInfo videoFormat)
Parameters
Media
|
Media
|
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
public void Initialize(MediaFoundationDeviceInfo videoDevice, MediaFoundationVideoFormatInfo videoFormat, MediaFoundationDeviceInfo audioDevice)
Parameters
Media
|
Media
|
Media
|
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application
code or internal processes call System.
Declaration
public override void OnApplyTemplate()
OnCameraError(CameraErrorEventArgs)
Fires the Camera
Declaration
protected virtual void OnCameraError(CameraErrorEventArgs e)
Parameters
Camera The event arguments. |
OnCreateAutomationPeer()
Returns class-specific System.
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System. The type-specific System. |
OnInitialized(EventArgs)
Raises the System.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
System. The System. |
OnRecordingEnded(RadRoutedEventArgs)
Fires the Recording
Declaration
protected virtual void OnRecordingEnded(RadRoutedEventArgs e)
Parameters
Rad The event arguments. |
OnRecordingStarted(RadRoutedEventArgs)
Fires the Recording
Declaration
protected virtual void OnRecordingStarted(RadRoutedEventArgs e)
Parameters
Rad The event arguments. |
OnSnapshotTaken(SnapshotTakenEventArgs)
Fires the Snapshot
Declaration
protected virtual void OnSnapshotTaken(SnapshotTakenEventArgs e)
Parameters
Snapshot The event arguments. |
Pause()
Pauses the video pipeline and pauses displaying the video feed.
Declaration
public void Pause()
remove_CameraError(CameraErrorEventHandler)
Declaration
public void remove_CameraError(CameraErrorEventHandler value)
Parameters
Camera
|
remove_RecordingStarted(RecordingStartedEventHandler)
Declaration
public void remove_RecordingStarted(RecordingStartedEventHandler value)
Parameters
remove_SnapshotTaken(SnapshotTakenEventHandler)
Declaration
public void remove_SnapshotTaken(SnapshotTakenEventHandler value)
Parameters
ResetTheme()
Resets the theme.
Declaration
public void ResetTheme()
SaveSnapshot()
Saves the snapshot that is currently being previewed. Preview
Declaration
public void SaveSnapshot()
ShutDown()
Shuts down the media session and the recording.
Declaration
public void ShutDown()
Start()
Starts the video pipeline and starts displaying the video feed.
Declaration
public void Start()
StartRecording()
Starts capturing the media source(s) to a file. The Recording
Declaration
public void StartRecording()
Stop()
Stops the video pipeline and stops displaying the video feed.
Declaration
public void Stop()
StopRecording()
Stops the file capture.
Declaration
public void StopRecording()
TakeSnapshot()
Takes a snapshot from the currently displayed video feed. To get the snapshot subscribe to the Snapshot
Declaration
public void TakeSnapshot()
Events
CameraError
Occurs when an error is preventing the camera from operating normally.
Declaration
public event CameraErrorEventHandler CameraError
Event Type
RecordingEnded
Occurs when video recording has ended.
Declaration
public event RoutedEventHandler RecordingEnded
Event Type
System.
|
RecordingStarted
Occurs when video recording is started.
Declaration
public event RecordingStartedEventHandler RecordingStarted
Event Type
SnapshotTaken
Occurs when a snapshot is taken. If Preview
Declaration
public event SnapshotTakenEventHandler SnapshotTaken