• Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • Conversational UI
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop
    Web
    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for ASP.NET AJAX UI for ASP.NET MVC UI for ASP.NET Core UI for Blazor UI for Silverlight UI for PHP UI for JSP
    Mobile
    UI for Xamarin
    Desktop
    UI for WinForms UI for WPF UI for WinUI UI for UWP
    Reporting & Mocking
    Telerik Reporting Telerik Report Server Telerik JustMock
    Automated Testing
    Test Studio Test Studio Dev Edition
    Debugging
    FiddlerCore Fiddler Everywhere
    CMS
    Sitefinity
    UX Design
    Unite UX
    Document Management
    Telerik Document Processing
    Innovations Lab
    VR DataViz
    Free Tools
    Fiddler Classic JustAssembly JustDecompile VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Search
  • Shopping cart
    • Account Overview
    • Edit Profile
    • Payment Profiles
    • Renewals & Upgrades
    • Support Tickets
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadWebCam

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

Inheritance
System.Object
RadControl
RadWebCam
Inherited Members
RadControl.RefCount
RadControl.isResizing2
RadControl.isDisposing2
RadControl.invalidResizeRect
RadControl.isAccessibilityRequested
RadControl.Construct()
RadControl.CreateBehavior()
RadControl.InitializeRootElement(RootRadElement)
RadControl.LoadElementTree()
RadControl.LoadElementTree(Size)
RadControl.SetIsInitializing(Boolean)
RadControl.ShouldSerializeBackColor()
RadControl.SetBackColorThemeOverrides()
RadControl.ResetBackColorThemeOverrides()
RadControl.ShouldSerializeForeColor()
RadControl.SetForeColorThemeOverrides()
RadControl.ResetForeColorThemeOverrides()
RadControl.ShouldSerializeFont()
RadControl.OnKeyDown(KeyEventArgs)
RadControl.OnKeyUp(KeyEventArgs)
RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.OnKeyPress(KeyPressEventArgs)
RadControl.OnClick(EventArgs)
RadControl.OnDoubleClick(EventArgs)
RadControl.OnMouseDown(MouseEventArgs)
RadControl.OnMouseUp(MouseEventArgs)
RadControl.OnMouseEnter(EventArgs)
RadControl.OnMouseLeave(EventArgs)
RadControl.OnMouseMove(MouseEventArgs)
RadControl.OnMouseHover(EventArgs)
RadControl.OnMouseWheel(MouseEventArgs)
RadControl.OnMouseCaptureChanged(EventArgs)
RadControl.OnGotFocus(EventArgs)
RadControl.OnLostFocus(EventArgs)
RadControl.OnCreateControl()
RadControl.OnHandleDestroyed(EventArgs)
RadControl.OnParentChanged(EventArgs)
RadControl.OnVisibleChanged(EventArgs)
RadControl.OnFontChanged(EventArgs)
RadControl.OnForeColorChanged(EventArgs)
RadControl.OnBackColorChanged(EventArgs)
RadControl.OnEnabledChanged(EventArgs)
RadControl.OnBindingContextChanged(EventArgs)
RadControl.OnLocationChanged(EventArgs)
RadControl.OnPaddingChanged(EventArgs)
RadControl.OnRightToLeftChanged(EventArgs)
RadControl.OnPaint(PaintEventArgs)
RadControl.OnLayout(LayoutEventArgs)
RadControl.OnAutoSizeChanged(EventArgs)
RadControl.WndProc(Message)
RadControl.OnInvalidated(RadElement)
RadControl.OnCaptureLosing()
RadControl.OnThemeChanged()
RadControl.OnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.OnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.ProcessMnemonic(Char)
RadControl.ProcessFocusRequested(RadElement)
RadControl.ProcessCaptureChangeRequested(RadElement, Boolean)
RadControl.ProcessAutoSizeChanged(Boolean)
RadControl.CallOnMouseCaptureChanged(EventArgs)
RadControl.CallBaseOnGotFocus(EventArgs)
RadControl.CallBaseOnLostFocus(EventArgs)
RadControl.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.CallOnMouseUp(MouseEventArgs)
RadControl.CallOnMouseDown(MouseEventArgs)
RadControl.CallOnClick(EventArgs)
RadControl.CallOnDoubleClick(EventArgs)
RadControl.CallOnMouseEnter(EventArgs)
RadControl.CallOnMouseWheel(MouseEventArgs)
RadControl.CallOnMouseLeave(EventArgs)
RadControl.CallOnMouseMove(MouseEventArgs)
RadControl.CallOnMouseHover(EventArgs)
RadControl.CallOnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.CallBaseOnKeyDown(KeyEventArgs)
RadControl.CallOnKeyDown(KeyEventArgs)
RadControl.CallBaseOnKeyPress(KeyPressEventArgs)
RadControl.CallOnKeyPress(KeyPressEventArgs)
RadControl.IsInputKey(Keys)
RadControl.GetInputElement()
RadControl.CallBaseOnKeyUp(KeyEventArgs)
RadControl.CallOnKeyUp(KeyEventArgs)
RadControl.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.CallOnVisibleChanged(EventArgs)
RadControl.BeginInit()
RadControl.EndInit()
RadControl.OnNotifyPropertyChanged(String)
RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadControl.IComponentTreeHandler.GetShowFocusCues()
RadControl.IComponentTreeHandler.CreateRootElement()
RadControl.IComponentTreeHandler.CreateChildItems(RadElement)
RadControl.IComponentTreeHandler.InitializeRootElement(RootRadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement, Rectangle)
RadControl.IComponentTreeHandler.InvalidateIfNotSuspended()
RadControl.IComponentTreeHandler.GetAmbientPropertyValue(RadProperty)
RadControl.IComponentTreeHandler.ControlThemeChangedCallback()
RadControl.IComponentTreeHandler.OnAmbientPropertyChanged(RadProperty)
RadControl.IComponentTreeHandler.OnFocusRequested(RadElement)
RadControl.IComponentTreeHandler.OnCaptureChangeRequested(RadElement, Boolean)
RadControl.IComponentTreeHandler.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnMouseCaptureChanged(EventArgs)
RadControl.IComponentTreeHandler.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.IComponentTreeHandler.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.GetPreferredSize(Size)
RadControl.GetRootElementDesiredSize(Int32, Int32, Int32, Int32)
RadControl.OnZoomGesture(ZoomGestureEventArgs)
RadControl.OnRotateGesture(RotateGestureEventArgs)
RadControl.OnPanGesture(PanGestureEventArgs)
RadControl.OnTwoFingerTapGesture(GestureEventArgs)
RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)
RadControl.OnGesture(GestureEventArgs)
RadControl.ProcessGesture(Message)
RadControl.EnableGesture(GestureType)
RadControl.DisableGesture(GestureType)
RadControl.Refresh()
RadControl.SuspendUpdate()
RadControl.ResumeUpdate()
RadControl.ResumeUpdate(Boolean)
RadControl.InvokeLayoutCallback(LayoutCallback)
RadControl.RegisterHostedControl(RadHostItem)
RadControl.UnregisterHostedControl(RadHostItem, Boolean)
RadControl.ControlDefinesThemeForElement(RadElement)
RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)
RadControl.GetPlainText()
RadControl.CanEditUIElement(RadElement)
RadControl.GetChildAt(Int32)
RadControl.ShouldSerializeProperty(RadProperty)
RadControl.CanEditElementAtDesignTime(RadElement)
RadControl.GetControlDefaultSize()
RadControl.GetDpiScaledSize(Size)
RadControl.GetDpiScaledSize(SizeF)
RadControl.ProcessCodedUIMessage(IPCMessage)
RadControl.FindPropertyInChildren(RadControl, IPCMessage)
RadControl.CallAccessibilityNotifyClients(AccessibleEvents, Int32)
RadControl.IPCHost.ProcessMessage(IPCMessage)
RadControl.ScaleControl(SizeF, BoundsSpecified)
RadControl.IComponentTreeHandler.get_Name()
RadControl.IComponentTreeHandler.set_Name(String)
RadControl.EnableDpiScaling
RadControl.EnableImageDpiScaling
RadControl.EnableSvgImages
RadControl.IsTrial
RadControl.IsLoaded
RadControl.LayoutManager
RadControl.ElementTree
RadControl.UseCompatibleTextRenderingDefaultValue
RadControl.Behavior
RadControl.RootElement
RadControl.Padding
RadControl.ThemeName
RadControl.Text
RadControl.EnableTheming
RadControl.ThemeClassName
RadControl.ImageList
RadControl.ImageScalingSize
RadControl.UseCompatibleTextRendering
RadControl.AutoSize
RadControl.MaximumSize
RadControl.MinimumSize
RadControl.Focusable
RadControl.Site
RadControl.CausesValidation
RadControl.IsInitializing
RadControl.SmallImageList
RadControl.SmallImageScalingSize
RadControl.IsDesignMode
RadControl.IsDisplayed
RadControl.FocusedElement
RadControl.AllowShowFocusCues
RadControl.ShowItemToolTips
RadControl.CommandBindings
RadControl.EnableKeyMap
RadControl.BackColor
RadControl.ForeColor
RadControl.Font
RadControl.ValidationCancel
RadControl.IComponentTreeHandler.IsDesignMode
RadControl.IComponentTreeHandler.ElementTree
RadControl.IComponentTreeHandler.Behavior
RadControl.IComponentTreeHandler.Initializing
RadControl.IComponentTreeHandler.ThemeClassName
RadControl.EnableGestures
RadControl.EnableAnalytics
RadControl.AnalyticsName
RadControl.EnableRadAccessibilityObjects
RadControl.AccessibilityRequested
RadControl.EnableCodedUITests
RadControl.EnableCodedUITestsDefaultValue
RadControl.IPCHost.Context
RadControl.ElementInvalidated
RadControl.ToolTipTextNeeded
RadControl.ScreenTipNeeded
RadControl.ThemeNameChanged
RadControl.Initialized
RadControl.PropertyChanged
RadControl.ZoomGesture
RadControl.RotateGesture
RadControl.PanGesture
RadControl.TwoFingerTapGesture
RadControl.PressAndTapGesture
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.RadWebCam.dll

Syntax

[TelerikToolboxCategory("Data Controls")]
public class RadWebCam : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider, IMediaFoundationRenderSurface

Constructors

RadWebCam()

Initializes a new instance of the RadWebCam class.

Declaration
public RadWebCam()

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.Boolean

CameraBorderElement

Gets the element representing the border of the camera.

Declaration
public LightVisualElement CameraBorderElement { get; }
Property Value
LightVisualElement

ControlPanelHeight

Gets or sets the height of the panel with the camera controls.

Declaration
public int ControlPanelHeight { get; set; }
Property Value
System.Int32

DefaultSize

Gets the default size of the control.

Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size

HasError

Gets a value indicating whether the camera is in a state where something is preventing normal operation.

Declaration
public bool HasError { get; protected set; }
Property Value
System.Boolean

IsPreviewingSnapshot

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

Declaration
public bool IsPreviewingSnapshot { get; set; }
Property Value
System.Boolean

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.Boolean

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.Boolean

RecordingFilePath

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

Declaration
public string RecordingFilePath { get; set; }
Property Value
System.String

SnapshotPreviewElement

Gets the snapshot preview element.

Declaration
public LightVisualElement SnapshotPreviewElement { get; }
Property Value
LightVisualElement

VideoRecordingElapsedTimeFormat

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

Declaration
public string VideoRecordingElapsedTimeFormat { get; set; }
Property Value
System.String

WebCamElement

Gets the main web cam control element.

Declaration
public RadWebCamElement WebCamElement { get; }
Property Value
RadWebCamElement

Methods

CreateCameraBorderElement()

Creates the camera border element.

Declaration
protected virtual LightVisualElement CreateCameraBorderElement()
Returns
LightVisualElement

CreateChildItems(RadElement)

Creates the child elements of the control.

Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement parent

The root element of the control's element tree.

Overrides
RadControl.CreateChildItems(RadElement)

CreateRootElement()

Creates the root RadElement of the control.

Declaration
protected override RootRadElement CreateRootElement()
Returns
RootRadElement

Overrides
RadControl.CreateRootElement()

CreateSnapshotPreviewElement()

Creates the snapshot preview element.

Declaration
protected virtual LightVisualElement CreateSnapshotPreviewElement()
Returns
LightVisualElement

CreateWebCamElement()

Creates the main RadWebCam element.

Declaration
protected virtual RadWebCamElement CreateWebCamElement()
Returns
RadWebCamElement

DiscardSnapshot()

Discards the taken snapshot when the control is in preview snapshot mode.

Declaration
public virtual void DiscardSnapshot()

Dispose(Boolean)

Releases the unmanaged resources used by the System.Windows.Forms.Control and its child controls and optionally releases the managed resources.

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

Overrides
RadControl.Dispose(Boolean)

GetAudioCaptureDevices()

Gets a list with all the available audio capture devices.

Declaration
public static ReadOnlyCollection<MediaFoundationDeviceInfo> GetAudioCaptureDevices()
Returns
System.Collections.ObjectModel.ReadOnlyCollection<MediaFoundationDeviceInfo>

GetVideoCaptureDevices()

Gets a list with all the available video capture devices.

Declaration
public static ReadOnlyCollection<MediaFoundationDeviceInfo> GetVideoCaptureDevices()
Returns
System.Collections.ObjectModel.ReadOnlyCollection<MediaFoundationDeviceInfo>

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
MediaFoundationDeviceInfo device

The device for which to get the available formats.

System.Boolean recordingFormatsOnly

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

Returns
System.Collections.ObjectModel.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
public virtual void Initialize(MediaFoundationDeviceInfo videoDevice, MediaFoundationVideoFormatInfo videoFormat)
Parameters
MediaFoundationDeviceInfo videoDevice

MediaFoundationVideoFormatInfo videoFormat

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 virtual void Initialize(MediaFoundationDeviceInfo videoDevice, MediaFoundationVideoFormatInfo videoFormat, MediaFoundationDeviceInfo audioDevice)
Parameters
MediaFoundationDeviceInfo videoDevice

MediaFoundationVideoFormatInfo videoFormat

MediaFoundationDeviceInfo audioDevice

OnCameraError(CameraErrorEventArgs)

Fires the CameraError event.

Declaration
protected virtual void OnCameraError(CameraErrorEventArgs e)
Parameters
CameraErrorEventArgs e

The event arguments.

OnHandleCreated(EventArgs)

Raises the System.Windows.Forms.Control.HandleCreated event.

Declaration
protected override void OnHandleCreated(EventArgs e)
Parameters
System.EventArgs e

An System.EventArgs that contains the event data.

OnLoad(Size)

Notifies that the control is about to be visualized.

Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.Drawing.Size desiredSize

Overrides
RadControl.OnLoad(Size)

OnRecordingEnded(EventArgs)

Fires the RecordingEnded event.

Declaration
protected virtual void OnRecordingEnded(EventArgs e)
Parameters
System.EventArgs e

The event arguments.

OnRecordingStarted(CancelEventArgs)

Fires the RecordingStarted event.

Declaration
protected virtual void OnRecordingStarted(CancelEventArgs e)
Parameters
System.ComponentModel.CancelEventArgs e

The event arguments.

OnSettingsDialogShowing(CameraSettingsDialogShowingEventArgs)

Fires the SettingsDialogShowing event.

Declaration
protected virtual void OnSettingsDialogShowing(CameraSettingsDialogShowingEventArgs e)
Parameters
CameraSettingsDialogShowingEventArgs e

The event arguments.

OnSnapshotTaken(SnapshotTakenEventArgs)

Fires the SnapshotTaken event.

Declaration
protected virtual void OnSnapshotTaken(SnapshotTakenEventArgs e)
Parameters
SnapshotTakenEventArgs e

The event arguments.

Pause()

Pauses the video pipeline and pauses displaying the video feed.

Declaration
public virtual void Pause()

SaveSnapshot()

Triggers the SnapshotTaken event when the control is in preview snapshot mode.

Declaration
public virtual void SaveSnapshot()

SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

Performs the work of setting the specified bounds of this control.

Declaration
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters
System.Int32 x

System.Int32 y

System.Int32 width

System.Int32 height

System.Windows.Forms.BoundsSpecified specified

Overrides
RadControl.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

ShowSettingsDialog()

Shows the camera settings dialog.

Declaration
public virtual void ShowSettingsDialog()

ShutDown()

Shuts down the video pipeline.

Declaration
public virtual void ShutDown()

Start()

Starts the video pipeline and starts displaying the video feed.

Declaration
public virtual void Start()

StartRecording()

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

Declaration
public virtual void StartRecording()

Stop()

Stops the video pipeline and stops displaying the video feed.

Declaration
public virtual void Stop()

StopRecording()

Stops the file capture.

Declaration
public virtual void StopRecording()

TakeSnapshot()

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

Declaration
public virtual void TakeSnapshot()

Events

CameraError

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

Declaration
public event EventHandler<CameraErrorEventArgs> CameraError
Event Type
System.EventHandler<CameraErrorEventArgs>

RecordingEnded

Occurs when video recording has ended.

Declaration
public event EventHandler RecordingEnded
Event Type
System.EventHandler

RecordingStarted

Occurs when video recording is started.

Declaration
public event EventHandler<CancelEventArgs> RecordingStarted
Event Type
System.EventHandler<System.ComponentModel.CancelEventArgs>

SettingsDialogShowing

Occurs when the settings dialog is about to be shown.

Declaration
public event EventHandler<CameraSettingsDialogShowingEventArgs> SettingsDialogShowing
Event Type
System.EventHandler<CameraSettingsDialogShowingEventArgs>

SnapshotTaken

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

Declaration
public event EventHandler<SnapshotTakenEventArgs> SnapshotTaken
Event Type
System.EventHandler<SnapshotTakenEventArgs>

Explicit Interface Implementations

IMediaFoundationRenderSurface.GetHandle()

Declaration
IntPtr IMediaFoundationRenderSurface.GetHandle()
Returns
System.IntPtr

Implements
IMediaFoundationRenderSurface.GetHandle()

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)

Was this article helpful?

Tell us how we can improve this article

Skip
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.