New to Telerik UI for WPFStart a free 30-day trial

Represents a virtual keyboard control that allows for customizable keyboard layouts and sound effects for key presses. The RadVirtualKeyboard supports various keyboard layouts, synchronization with system culture settings, and can handle sound playback for key presses.

This control includes properties such as VirtualKeyboardTemplateSelector for customizing key templates, Culture for setting the keyboard's culture-specific language, and IsKeyPressSoundEnabled to enable or disable sound effects when keys are pressed.

The virtual keyboard can load its layout from an XML description, which allows for dynamic key arrangements, and provides methods to reset themes and manage keyboard states (e.g., Caps Lock, Num Lock). Additionally, it implements IDisposable for resource management.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
[TelerikToolboxCategory("Navigation")]
public class RadVirtualKeyboard : Control, IDisposable

Inheritance: objectRadVirtualKeyboard

Implements: IDisposable

Constructors

Initializes a new instance of the RadVirtualKeyboard class.

C#
public RadVirtualKeyboard()

Fields

CultureProperty

DependencyProperty

Identifies the Culture dependency property.

C#
public static readonly DependencyProperty CultureProperty

Identifies the DefaultKeyboardLayout dependency property.

C#
public static readonly DependencyProperty DefaultKeyboardLayoutProperty

Identifies the IsKeyPressSoundEnabled dependency property.

C#
public static readonly DependencyProperty IsKeyPressSoundEnabledProperty

Identifies the SynchronizeCultureWithSystem dependency property.

C#
public static readonly DependencyProperty SynchronizeCultureWithSystemProperty

Identifies the VirtualKeyboardTemplateSelector dependency property.

C#
public static readonly DependencyProperty VirtualKeyboardTemplateSelectorProperty

Properties

Gets or sets the culture to be displayed in the keyboard.

C#
public CultureInfo Culture { get; set; }

Gets or sets one of the default keyboard layouts.

C#
public DefaultKeyboardLayout DefaultKeyboardLayout { get; set; }

Gets or sets whether pressing a key will also produce a sound.

C#
public bool IsKeyPressSoundEnabled { get; set; }

Gets or sets the factory used for creation of key view models.

C#
public IKeyViewModelFactory KeyFactory { get; set; }

Gets or sets the player to play sounds when a key is pressed.

C#
public IKeySoundPlayer KeySoundPlayer { get; set; }

Gets or sets a value indicating whether the component should track the systems culture and adjust the keys accordingly.

C#
public bool SynchronizeCultureWithSystem { get; set; }

Gets or sets the template selector used for creating visual elements for keys.

C#
public VirtualKeyboardTemplateSelector VirtualKeyboardTemplateSelector { get; set; }

Methods

Releases all resources used by the RadVirtualKeyboard.

C#
public void Dispose()

Implements: IDisposable.Dispose()

Remarks:

After calling this method, the RadVirtualKeyboard object can no longer be used. Ensure to call this method to free up any unmanaged resources.

C#
protected virtual void Dispose(bool disposing)
Parameters:disposingbool
C#
protected override void Finalize()

Loads an xml containing a description of a virtual keyboard's layout.

C#
public void LoadLayout(Stream stream)
Parameters:streamStream

The stream to load the layout from.

Loads an xml containing a description of a virtual keyboard's layout or the default layout.

C#
public void LoadLayout(string filename)
Parameters:filenamestring

The file to load the layout from. Set this to null to load the default layout.

Called when the template for the RadVirtualKeyboard is applied. This method is responsible for initializing any template-specific behavior and components.

C#
public override void OnApplyTemplate()
C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

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

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Resets the theme.

C#
public void ResetTheme()