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

Represents the class for virtual keyboard numpad key view models.

Definition

Constructors

Initializes a new instance of the NumpadKeyViewModel class.

C#
public NumpadKeyViewModel(int virtualKey, double keyWidth, double keyHeight, string displayText, int alternateVirtualKey, string alternateText)
Parameters:virtualKeyint

The virtual key.

keyWidthdouble

The width of the key.

keyHeightdouble

The height of the key.

displayTextstring

The display text of the key.

alternateVirtualKeyint

The alternate virtual key.

alternateTextstring

The alternate text.

Properties

Gets or sets the alternate display text of the key. This text is used when the NumLock is not active.

C#
public string AlternateText { get; set; }

Gets or sets the alternate virtual key code. This key is used when the NumLock is not active.

C#
public int AlternateVirtualKey { get; set; }

Gets or sets the primary display text of the key. This text is used when the NumLock is active.

C#
public string PrimaryText { get; set; }

Gets or sets the primary virtual key code. This key is used when the NumLock is active.

C#
public int PrimaryVirtualKey { 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 NumpadKeyViewModel based on the specified key update context.

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

The key update context used to update the NumpadKeyViewModel.

Overrides: BaseKeyViewModel.Update(IKeyUpdateContext)