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

Represents the class for virtual keyboard regular key view models.

Definition

Constructors

Initializes a new instance of the RegularKeyViewModel class.

C#
public RegularKeyViewModel(int virtualKey, double keyWidth, double keyHeight, bool showSecondaryText, string displayText = null)
Parameters:virtualKeyint

The virtual key.

keyWidthdouble

The width of the key.

keyHeightdouble

The height of the key.

showSecondaryTextbool

Indicates whether to show the secondary text.

displayTextstring

The display text of the key.

Properties

Gets or sets the display text shown when Alt key is pressed.

C#
public string AltText { get; set; }

Gets or sets the display text shown when CapsLock is toggled.

C#
public string CapsLockText { get; set; }

Gets or sets the display text shown when no modifier key is pressed.

C#
public string LowerText { get; set; }

Gets or sets the display text shown when Shift key is pressed.

C#
public string ShiftText { get; set; }

Gets or sets the an additional text shown next to the primary display text.

C#
public bool ShowSecondaryText { get; set; }

Methods

The method called by the default command assigned to the key.

C#
protected override void OnKeyCommandExecuted(object commandParameter)
Parameters:commandParameterobject

Overrides: BaseKeyViewModel.OnKeyCommandExecuted(object)

Updates the state of the regular key view model based on the provided key update context.

C#
public override void Update(IKeyUpdateContext context)
Parameters:contextIKeyUpdateContext

An instance of IKeyUpdateContext that supplies the necessary information for the update.

Overrides: BaseKeyViewModel.Update(IKeyUpdateContext)