Interface
IKeyFactory

Exposes methods used to create keys for RadVirtualKeyboard.

Definition

Namespace:Telerik.WinControls.VirtualKeyboard

Assembly:Telerik.WinControls.UI.dll

Syntax:

cs-api-definition
public interface IKeyFactory

Methods

CreateKey(int, KeyType, double, double, bool, bool)

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

Declaration

cs-api-definition
IKey CreateKey(int keyCode, KeyType keyType, double width = 1, double height = 1, bool sharpStyle = false, bool showSecondaryText = false)

Parameters

keyCode

int

The virtual key code.

keyType

KeyType

The type of the key.

width

double

The logical width of key.

height

double

The logical height of key.

sharpStyle

bool

Indicates whether the key has more noticeable(sharp) style.

showSecondaryText

bool

Indicates whether to show the secondary text element.

Returns

IKey

The created IKey instance.

CreateNumpadKey(int, string, int, string, double, double, bool, Font, Font)

Creates a numpad key, which has two different virtual key codes to be sent depending on the state of Numlock key.

Declaration

cs-api-definition
IKey CreateNumpadKey(int numLockActiveCode, string activeKeyText, int alternateKeyCode, string alternateKeyText, double width = 1, double height = 1, bool sharpStyle = false, Font activeKeyFont = null, Font alternateKeyFont = null)

Parameters

numLockActiveCode

int

The virtual key code of active state.

activeKeyText

string

The text in active state.

alternateKeyCode

int

The virtual key code in alternate mode.

alternateKeyText

string

The text in alternate state.

width

double

The logical width of key.

height

double

The logical height of key.

sharpStyle

bool

Indicates whether the key has more noticeable(sharp) style.

activeKeyFont

Font

The font specified to the key element in active state.

alternateKeyFont

Font

The font specified to the key element in alternate state.

Returns

IKey

The created IKey instance.

CreateSpecialKey(int, string, KeyType, double, double, bool, Font)

Creates a special key that sends a virtual key code when pressed and displays a text.

Declaration

cs-api-definition
IKey CreateSpecialKey(int keyCode, string displayText, KeyType keyType, double width = 1, double height = 1, bool sharpStyle = false, Font font = null)

Parameters

keyCode

int

The virtual key code.

displayText

string

The display text.

keyType

KeyType

The type of the key.

width

double

The logical width of key.

height

double

The logical height of key.

sharpStyle

bool

Indicates whether the key has more noticeable(sharp) style.

font

Font

The font specified to the key element.

Returns

IKey

The created IKey instance.