ClassKeyFactory
A factory used to create key instances.
Definition
Namespace:Telerik.WinControls.VirtualKeyboard
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class KeyFactory : IKeyFactory
Inheritance: objectKeyFactory
Implements:
Constructors
KeyFactory()
Declaration
public KeyFactory()
Methods
CreateKey(int, KeyType, double, double, bool, bool)
Creates a key that sends a virtual key code when pressed.
Declaration
public virtual IKey CreateKey(int keyCode, KeyType keyType = KeyType.Normal, double width = 1, double height = 1, bool sharpStyle = false, bool showSecondaryText = false)
Parameters
keyCode
The virtual key code.
keyType
The type of the key.
width
The logical width of key.
height
The logical height of key.
sharpStyle
Indicates whether the key has more noticeable(sharp) style.
showSecondaryText
Indicates whether to show the secondary text element.
Returns
The created IKey instance.
Implements
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
public virtual 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
The virtual key code of active state.
activeKeyText
The text in active state.
alternateKeyCode
The virtual key code in alternate mode.
alternateKeyText
The text in alternate state.
width
The logical width of key.
height
The logical height of key.
sharpStyle
Indicates whether the key has more noticeable(sharp) style.
activeKeyFont
The font specified to the key element in active state.
alternateKeyFont
The font specified to the key element in alternate state.
Returns
The created IKey instance.
Implements
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
public virtual IKey CreateSpecialKey(int keyCode, string displayText, KeyType keyType = KeyType.Normal, double width = 1, double height = 1, bool sharpStyle = false, Font font = null)
Parameters
keyCode
The virtual key code.
displayText
The display text.
keyType
The type of the key.
width
The logical width of key.
height
The logical height of key.
sharpStyle
Indicates whether the key has more noticeable(sharp) style.
font
The font specified to the key element.
Returns
The created IKey instance.
Implements