Class
RadVirtualKeyboard

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:

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

Inheritance: objectRadVirtualKeyboard

Implements: IDisposable

Constructors

RadVirtualKeyboard()

Initializes a new instance of the RadVirtualKeyboard class.

Declaration

cs-api-definition
public RadVirtualKeyboard()

Fields

CultureProperty

Identifies the Culture dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty CultureProperty

Field Value

DependencyProperty

DefaultKeyboardLayoutProperty

Identifies the DefaultKeyboardLayout dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DefaultKeyboardLayoutProperty

Field Value

DependencyProperty

IsKeyPressSoundEnabledProperty

Identifies the IsKeyPressSoundEnabled dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsKeyPressSoundEnabledProperty

Field Value

DependencyProperty

SynchronizeCultureWithSystemProperty

Identifies the SynchronizeCultureWithSystem dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SynchronizeCultureWithSystemProperty

Field Value

DependencyProperty

VirtualKeyboardTemplateSelectorProperty

Identifies the VirtualKeyboardTemplateSelector dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty VirtualKeyboardTemplateSelectorProperty

Field Value

DependencyProperty

Properties

Culture

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

Declaration

cs-api-definition
public CultureInfo Culture { get; set; }

Property Value

CultureInfo

DefaultKeyboardLayout

Gets or sets one of the default keyboard layouts.

Declaration

cs-api-definition
public DefaultKeyboardLayout DefaultKeyboardLayout { get; set; }

Property Value

DefaultKeyboardLayout

IsKeyPressSoundEnabled

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

Declaration

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

Property Value

bool

KeyFactory

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

Declaration

cs-api-definition
public IKeyViewModelFactory KeyFactory { get; set; }

Property Value

IKeyViewModelFactory

KeySoundPlayer

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

Declaration

cs-api-definition
public IKeySoundPlayer KeySoundPlayer { get; set; }

Property Value

IKeySoundPlayer

SynchronizeCultureWithSystem

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

Declaration

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

Property Value

bool

VirtualKeyboardTemplateSelector

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

Declaration

cs-api-definition
public VirtualKeyboardTemplateSelector VirtualKeyboardTemplateSelector { get; set; }

Property Value

VirtualKeyboardTemplateSelector

Methods

Dispose()

Releases all resources used by the RadVirtualKeyboard.

Declaration

cs-api-definition
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.

Dispose(bool)

Declaration

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

Parameters

disposing

bool

Finalize()

Declaration

cs-api-definition
protected override void Finalize()

LoadLayout(Stream)

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

Declaration

cs-api-definition
public void LoadLayout(Stream stream)

Parameters

stream

Stream

The stream to load the layout from.

LoadLayout(string)

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

Declaration

cs-api-definition
public void LoadLayout(string filename)

Parameters

filename

string

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

OnApplyTemplate()

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

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCreateAutomationPeer()

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

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.

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()