skip navigation
  • Product Bundles

    DevCraft

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

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadVirtualKeyboard

Represents a virtual keyboard control that provides on-screen input capabilities for user interaction. This control allows users to input text and commands without requiring a physical keyboard, making it ideal for touch-enabled applications and accessibility scenarios.

Inheritance
System.Object
RadControl
RadVirtualKeyboard
Inherited Members
RadControl.isResizing2
RadControl.isDisposing2
RadControl.invalidResizeRect
RadControl.isAccessibilityRequested
RadControl.Dispose(Boolean)
RadControl.Construct()
RadControl.CreateBehavior()
RadControl.CreateRootElement()
RadControl.CreateChildItems(RadElement)
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.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.OnLoad(Size)
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.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
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.ShouldSerializeProperty(RadProperty, RadObject)
RadControl.ResetProperty(RadProperty, RadObject)
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.PerformRadAutoScale(Nullable<BoundsSpecified>)
RadControl.SetRadAutoScale(Boolean)
RadControl.IComponentTreeHandler.get_Name()
RadControl.IComponentTreeHandler.set_Name(String)
RadControl.EnableDpiScaling
RadControl.EnableRadAutoScale
RadControl.EnableRadFormInitialDpiScaling
RadControl.EnableImageDpiScaling
RadControl.EnableSvgImages
RadControl.IsTrial
RadControl.IsLoaded
RadControl.LayoutManager
RadControl.ElementTree
RadControl.UseCompatibleTextRenderingDefaultValue
RadControl.Behavior
RadControl.RootElement
RadControl.Padding
RadControl.ThemeName
RadControl.EnableTheming
RadControl.ThemeClassName
RadControl.ImageList
RadControl.ImageScalingSize
RadControl.UseCompatibleTextRendering
RadControl.AutoSize
RadControl.MaximumSize
RadControl.MinimumSize
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.EnableUIAutomation
RadControl.EnableUIAutomationDefaultValue
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.UI.dll

Syntax

public class RadVirtualKeyboard : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider

Constructors

RadVirtualKeyboard()

Initializes a new instance of the RadVirtualKeyboard class with default settings. The keyboard is created as non-focusable and non-tab-stop to prevent interference with the target input controls.

Declaration
public RadVirtualKeyboard()

Properties

DefaultSize

Gets the default size of the virtual keyboard control. This size provides optimal dimensions for displaying a complete keyboard layout.

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

Focusable

This property is not relevant for this class.

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

Overrides
RadControl.Focusable

LayoutType

Gets or sets the keyboard layout type that determines the arrangement and types of keys displayed. Changing this value automatically updates the MainLayoutPanel property with a predefined layout configuration.

Declaration
public KeyboardLayoutType LayoutType { get; set; }
Property Value
KeyboardLayoutType

MainLayoutPanel

Gets or sets the main layout panel that hosts and arranges keyboard layouts and their key elements. This panel determines the overall structure and organization of the virtual keyboard interface.

Declaration
public VirtualKeyboardLayoutPanel MainLayoutPanel { get; set; }
Property Value
VirtualKeyboardLayoutPanel

ScaleFontOnResize

Gets or sets a value indicating whether the font size should automatically scale when the control size changes. When enabled, key text remains proportional to the keyboard size, ensuring optimal readability at different scales.

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

SynchronizeCultureWithSystem

Gets or sets a value indicating whether the keyboard should automatically synchronize with system language changes. When enabled, the keyboard layout will update automatically when the system input language is changed.

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

Text

This property is not relevant for this class.

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

Overrides
RadControl.Text

UseClickSound

Gets or sets a value indicating whether to play an audible sound when keys are pressed. This provides audio feedback to enhance the user experience during keyboard interaction.

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

VirtualKeyboardElement

Gets the RadVirtualKeyboardElement instance that contains the core keyboard functionality. This element manages all keyboard operations, layout, and visual appearance.

Declaration
public RadVirtualKeyboardElement VirtualKeyboardElement { get; }
Property Value
RadVirtualKeyboardElement

XmlSerializationInfo

Gets or sets the serialization configuration used by layout save and load operations. When set to null, the default serialization configuration from GetDefaultXmlSerializationInfo() is used. This property controls which properties and objects are included in the XML serialization process.

Declaration
public ComponentXmlSerializationInfo XmlSerializationInfo { get; set; }
Property Value
ComponentXmlSerializationInfo

Methods

CalculateDesiredSize()

Calculates the optimal size for the RadVirtualKeyboard based on the current layout configuration. The calculation considers key dimensions, layout structure, padding, and DPI scaling to provide the ideal control size.

Declaration
public virtual SizeF CalculateDesiredSize()
Returns
System.Drawing.SizeF

A System.Drawing.SizeF representing the recommended dimensions for the virtual keyboard.

CanEditElementAtDesignTime(RadElement)

Determines whether the specified element should be visible in the design-time element hierarchy editor. This method controls which elements appear in the Edit UI Elements dialog during design time.

Declaration
protected override bool CanEditElementAtDesignTime(RadElement element)
Parameters
RadElement element

The RadElement to evaluate for design-time visibility.

Returns
System.Boolean

True if the element should be visible in the element editor; otherwise, false.

Overrides
RadControl.CanEditElementAtDesignTime(RadElement)

CreateAccessibilityInstance()

Creates an accessibility object that provides support for UI automation and assistive technologies. Returns a specialized accessibility object when EnableRadAccessibilityObjects is enabled.

Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
System.Windows.Forms.AccessibleObject

An System.Windows.Forms.AccessibleObject that provides accessibility support for the virtual keyboard.

CreateKeyboardElement()

Creates the main RadVirtualKeyboardElement that contains all keyboard functionality and UI elements. This method can be overridden in derived classes to provide custom keyboard element implementations.

Declaration
protected virtual RadVirtualKeyboardElement CreateKeyboardElement()
Returns
RadVirtualKeyboardElement

A new instance of RadVirtualKeyboardElement that serves as the core keyboard component.

GetDefaultXmlSerializationInfo()

Creates and returns the default XML serialization configuration for the RadVirtualKeyboard control. This configuration defines which properties should be serialized, hidden, or treated as content during save/load operations.

Declaration
protected virtual ComponentXmlSerializationInfo GetDefaultXmlSerializationInfo()
Returns
ComponentXmlSerializationInfo

A ComponentXmlSerializationInfo object containing the default serialization rules.

LoadLayout(Stream)

Loads keyboard layout configuration from XML data in the specified stream. The stream position is reset to the beginning if it is currently at the end.

Declaration
public virtual void LoadLayout(Stream stream)
Parameters
System.IO.Stream stream

The System.IO.Stream containing XML layout data to be loaded.

LoadLayout(String)

Loads keyboard layout configuration from an XML file at the specified path. If the file does not exist, an error message is displayed to the user.

Declaration
public virtual void LoadLayout(string fileName)
Parameters
System.String fileName

The full path to the XML file containing the saved layout configuration.

LoadLayout(XmlReader)

Loads keyboard layout configuration from XML data using the specified XML reader. If an error occurs during loading, an error message is displayed to the user.

Declaration
public virtual void LoadLayout(XmlReader xmlReader)
Parameters
System.Xml.XmlReader xmlReader

The System.Xml.XmlReader containing the XML layout data to be processed.

OnKeyDown(KeyEventArgs)

This method is not relevant for this class.

Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs e

Overrides
RadControl.OnKeyDown(KeyEventArgs)

OnKeyPress(KeyPressEventArgs)

This method is not relevant for this class.

Declaration
protected override void OnKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs e

Overrides
RadControl.OnKeyPress(KeyPressEventArgs)

OnKeyUp(KeyEventArgs)

This method is not relevant for this class.

Declaration
protected override void OnKeyUp(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs e

Overrides
RadControl.OnKeyUp(KeyEventArgs)

OnPreviewKeyDown(PreviewKeyDownEventArgs)

This method is not relevant for this class.

Declaration
protected override void OnPreviewKeyDown(PreviewKeyDownEventArgs e)
Parameters
System.Windows.Forms.PreviewKeyDownEventArgs e

Overrides
RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)

SaveLayout(Stream)

Serializes the current keyboard layout configuration to XML format and writes it to the specified stream. The stream remains open after the operation completes, allowing for additional operations.

Declaration
public virtual void SaveLayout(Stream stream)
Parameters
System.IO.Stream stream

The System.IO.Stream where the XML layout data will be written.

SaveLayout(String)

Serializes the current keyboard layout configuration to an XML file at the specified path. The file will be created or overwritten with the current layout data in a formatted XML structure.

Declaration
public virtual void SaveLayout(string fileName)
Parameters
System.String fileName

The full path to the file where the layout data will be saved.

SaveLayout(XmlWriter)

Serializes the current keyboard layout configuration to XML format using the specified XML writer. The layout data includes key arrangements, properties, and customizations that can be restored later.

Declaration
public virtual void SaveLayout(XmlWriter xmlWriter)
Parameters
System.Xml.XmlWriter xmlWriter

The System.Xml.XmlWriter used to write the serialized layout data.

Events

KeyDown

This event is not relevant for this class.

Declaration
public event KeyEventHandler KeyDown
Event Type
System.Windows.Forms.KeyEventHandler

KeyPress

This event is not relevant for this class.

Declaration
public event KeyPressEventHandler KeyPress
Event Type
System.Windows.Forms.KeyPressEventHandler

KeySending

Occurs when a key is about to be sent to the target input control. This event allows for cancellation and modification of key sending operations before they are processed.

Declaration
public event VirtualKeyboardKeySendingEventHandler KeySending
Event Type
VirtualKeyboardKeySendingEventHandler

KeySent

Occurs after a key has been successfully sent to the target input control. This event provides notification that a key operation has been completed.

Declaration
public event VirtualKeyboardKeySentEventHandler KeySent
Event Type
VirtualKeyboardKeySentEventHandler

KeyUp

This event is not relevant for this class.

Declaration
public event KeyEventHandler KeyUp
Event Type
System.Windows.Forms.KeyEventHandler

PreviewKeyDown

This event is not relevant for this class.

Declaration
public event PreviewKeyDownEventHandler PreviewKeyDown
Event Type
System.Windows.Forms.PreviewKeyDownEventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
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.