Class BaseKeyViewModel
Represents the base class for virtual keyboard key view models.
Inherited Members
Namespace: Telerik.Windows.Controls.VirtualKeyboard
Assembly: Telerik.Windows.Controls.Navigation.dll
Syntax
public abstract class BaseKeyViewModel : ViewModelBase, INotifyPropertyChanged, IDisposable
Constructors
BaseKeyViewModel(Int32, KeyType, Double, Double)
Initializes a new instance of the BaseKeyViewModel class.
Declaration
protected BaseKeyViewModel(int virtualKey, KeyType keyType, double keyWidth, double keyHeight)
Parameters
System.Int32
virtualKey
The virtual key. |
KeyType
keyType
The type of the key. |
System.Double
keyWidth
The width of the key. |
System.Double
keyHeight
The height of the key. |
Properties
DisplayText
Gets or sets the text to be displayed for the key.
Declaration
public string DisplayText { get; set; }
Property Value
System.String
|
KeyCommand
Gets or sets the command to be executed hen the key is pressed.
Declaration
public ICommand KeyCommand { get; set; }
Property Value
System.Windows.Input.ICommand
|
KeyHeight
Gets the height of the key.
Declaration
public double KeyHeight { get; }
Property Value
System.Double
|
KeySoundPlayer
Gets the sound player that will be called to produce a sound when this key is pressed.
Declaration
public IKeySoundPlayer KeySoundPlayer { get; }
Property Value
IKeySoundPlayer
|
KeyType
KeyWidth
Gets the width of the key.
Declaration
public double KeyWidth { get; }
Property Value
System.Double
|
ModifierKeys
Gets the state of the modifier keys from the last update.
Declaration
public ModifierKeys ModifierKeys { get; }
Property Value
System.Windows.Input.ModifierKeys
|
VirtualKey
Gets the virtual key of the key.
Declaration
public int VirtualKey { get; }
Property Value
System.Int32
|
Methods
GetModifiers()
Gets the state of the modifier keys (Shift, Ctrl...).
Declaration
protected ReadOnlyCollection<int> GetModifiers()
Returns
System.Collections.ObjectModel.ReadOnlyCollection<System.Int32>
|
OnKeyCommandExecuted(Object)
The method called by the default command assigned to the key.
Declaration
protected abstract void OnKeyCommandExecuted(object commandParameter)
Parameters
System.Object
commandParameter
|
Update(IKeyUpdateContext)
Called when the state of the keyboard changes.
Declaration
public virtual void Update(IKeyUpdateContext context)
Parameters
IKeyUpdateContext
context
|