ClassRadVirtualKeyboard
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:
[TelerikToolboxCategory("Navigation")]
public class RadVirtualKeyboard : Control, IDisposable
Inheritance: objectRadVirtualKeyboard
Implements:
Constructors
RadVirtualKeyboard()
Initializes a new instance of the RadVirtualKeyboard class.
Declaration
public RadVirtualKeyboard()
Fields
CultureProperty
Identifies the Culture dependency property.
Declaration
public static readonly DependencyProperty CultureProperty
Field Value
DependencyProperty
DefaultKeyboardLayoutProperty
Identifies the DefaultKeyboardLayout dependency property.
Declaration
public static readonly DependencyProperty DefaultKeyboardLayoutProperty
Field Value
DependencyProperty
IsKeyPressSoundEnabledProperty
Identifies the IsKeyPressSoundEnabled dependency property.
Declaration
public static readonly DependencyProperty IsKeyPressSoundEnabledProperty
Field Value
DependencyProperty
SynchronizeCultureWithSystemProperty
Identifies the SynchronizeCultureWithSystem dependency property.
Declaration
public static readonly DependencyProperty SynchronizeCultureWithSystemProperty
Field Value
DependencyProperty
VirtualKeyboardTemplateSelectorProperty
Identifies the VirtualKeyboardTemplateSelector dependency property.
Declaration
public static readonly DependencyProperty VirtualKeyboardTemplateSelectorProperty
Field Value
DependencyProperty
Properties
Culture
Gets or sets the culture to be displayed in the keyboard.
DefaultKeyboardLayout
Gets or sets one of the default keyboard layouts.
Declaration
public DefaultKeyboardLayout DefaultKeyboardLayout { get; set; }
Property Value
IsKeyPressSoundEnabled
Gets or sets whether pressing a key will also produce a sound.
KeyFactory
Gets or sets the factory used for creation of key view models.
Declaration
public IKeyViewModelFactory KeyFactory { get; set; }
Property Value
KeySoundPlayer
Gets or sets the player to play sounds when a key is pressed.
Declaration
public IKeySoundPlayer KeySoundPlayer { get; set; }
Property Value
SynchronizeCultureWithSystem
Gets or sets a value indicating whether the component should track the systems culture and adjust the keys accordingly.
Declaration
public bool SynchronizeCultureWithSystem { get; set; }
Property Value
VirtualKeyboardTemplateSelector
Gets or sets the template selector used for creating visual elements for keys.
Declaration
public VirtualKeyboardTemplateSelector VirtualKeyboardTemplateSelector { get; set; }
Property Value
Methods
Dispose()
Releases all resources used by the RadVirtualKeyboard.
Declaration
public void Dispose()
Implements
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
protected virtual void Dispose(bool disposing)
Parameters
disposing
Finalize()
Declaration
protected override void Finalize()
LoadLayout(Stream)
Loads an xml containing a description of a virtual keyboard's layout.
Declaration
public void LoadLayout(Stream stream)
Parameters
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
public void LoadLayout(string filename)
Parameters
filename
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
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.