Class
DefaultKeyFactory

Represents a factory for creating RadVirtualKeyboard key view models.

Definition

Namespace:Telerik.Windows.Controls.VirtualKeyboard

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

cs-api-definition
public class DefaultKeyFactory : IKeyViewModelFactory

Inheritance: objectDefaultKeyFactory

Implements: IKeyViewModelFactory

Constructors

DefaultKeyFactory()

Declaration

cs-api-definition
public DefaultKeyFactory()

Methods

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

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

Declaration

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

virtualKey

int

The virtual key code.

keyType

KeyType

The type of the key.

displayText

string

The display text.

width

double

The logical width of key.

height

double

The logical height of key.

alternateVirtualKey

int

The virtual key code in alternate mode.

alternateText

string

The text in alternate state.

showSecondaryText

bool

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)

CreateSpace(double, double)

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

Declaration

cs-api-definition
public virtual BaseKeyViewModel CreateSpace(double width, double height)

Parameters

width

double

The width of the space.

height

double

The height of the space.

Returns

BaseKeyViewModel

The created BaseKeyViewModel instance.

Implements IKeyViewModelFactory.CreateSpace(double, double)