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

Represents a factory for creating RadVirtualKeyboard key view models.

Definition

Namespace:Telerik.Windows.Controls.VirtualKeyboard

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
public class DefaultKeyFactory : IKeyViewModelFactory

Inheritance: objectDefaultKeyFactory

Implements: IKeyViewModelFactory

Constructors

C#
public DefaultKeyFactory()

Methods

Creates a key that sends a virtual key code when pressed.

C#
public virtual BaseKeyViewModel CreateKey(int virtualKey, KeyType keyType = KeyType.Normal, string displayText = null, double width = 1, double height = 1, int alternateVirtualKey = -1, string alternateText = null, bool showSecondaryText = false)
Parameters:virtualKeyint

The virtual key code.

keyTypeKeyType

The type of the key.

displayTextstring

The display text.

widthdouble

The logical width of key.

heightdouble

The logical height of key.

alternateVirtualKeyint

The virtual key code in alternate mode.

alternateTextstring

The text in alternate state.

showSecondaryTextbool

Indicates whether to show the secondary text element.

Returns:

BaseKeyViewModel

The created BaseKeyViewModel instance.

Implements: IKeyViewModelFactory.CreateKey(int, KeyType, string, double, double, int, string, bool)

Creates a view model that represents empty spaces in a row of keys.

C#
public virtual BaseKeyViewModel CreateSpace(double width, double height)
Parameters:widthdouble

The width of the space.

heightdouble

The height of the space.

Returns:

BaseKeyViewModel

The created BaseKeyViewModel instance.

Implements: IKeyViewModelFactory.CreateSpace(double, double)