GrapeCity.Xaml.SpreadSheet.UI
KeyStroke Constructor(VirtualKey,VirtualKeyModifiers)
Example 


GrapeCity.Xaml.SpreadSheet.UI Namespace > KeyStroke Structure > KeyStroke Constructor : KeyStroke Constructor(VirtualKey,VirtualKeyModifiers)
The key code defined by this GrapeCity.Windows.SpreadSheet.UI.KeyStroke structure.
The modifier keys defined by this GrapeCity.Windows.SpreadSheet.UI.KeyStroke structure.
Initializes a new instance of the GrapeCity.Windows.SpreadSheet.UI.KeyStroke structure with the specified System.Windows.Input.Key and System.Windows.Input.ModifierKeys.
Syntax
'Declaration
 
Public Function New( _
   ByVal keyCode As VirtualKey, _
   ByVal modifiers As VirtualKeyModifiers _
)
'Usage
 
Dim keyCode As VirtualKey
Dim modifiers As VirtualKeyModifiers
 
Dim instance As New KeyStroke(keyCode, modifiers)
public KeyStroke( 
   VirtualKey keyCode,
   VirtualKeyModifiers modifiers
)

Parameters

keyCode
The key code defined by this GrapeCity.Windows.SpreadSheet.UI.KeyStroke structure.
modifiers
The modifier keys defined by this GrapeCity.Windows.SpreadSheet.UI.KeyStroke structure.
Example
This example maps and removes keys.
gcSpreadSheet1.View.KeyMap.Remove(new GrapeCity.Xaml.SpreadSheet.UI.KeyStroke(Windows.System.VirtualKey.Enter, Windows.System.VirtualKeyModifiers.None));
gcSpreadSheet1.View.KeyMap.Add(new GrapeCity.Xaml.SpreadSheet.UI.KeyStroke(Windows.System.VirtualKey.Enter, Windows.System.VirtualKeyModifiers.None), GrapeCity.Xaml.SpreadSheet.UI.SpreadActions.StartEditing);
gcSpreadSheet1.View.KeyMap.Remove(new GrapeCity.Xaml.SpreadSheet.UI.KeyStroke(Windows.System.VirtualKey.Enter, Windows.System.VirtualKeyModifiers.Menu));
gcSpreadSheet1.View.KeyMap.Add(new GrapeCity.Xaml.SpreadSheet.UI.KeyStroke(Windows.System.VirtualKey.M, Windows.System.VirtualKeyModifiers.Control), GrapeCity.Xaml.SpreadSheet.UI.SpreadActions.InputNewLine);
Dim enterKey As New GrapeCity.Xaml.SpreadSheet.UI.KeyStroke(Windows.System.VirtualKey.Enter, Windows.System.VirtualKeyModifiers.None)
gcSpreadSheet1.View.KeyMap.Remove(enterKey)
gcSpreadSheet1.View.KeyMap.Add(enterKey, AddressOf GrapeCity.Xaml.SpreadSheet.UI.SpreadActions.StartEditing)
gcSpreadSheet1.View.KeyMap.Remove(New GrapeCity.Xaml.SpreadSheet.UI.KeyStroke(Windows.System.VirtualKey.Enter, Windows.System.VirtualKeyModifiers.Menu))
gcSpreadSheet1.View.KeyMap.Add(New GrapeCity.Xaml.SpreadSheet.UI.KeyStroke(Windows.System.VirtualKey.M, Windows.System.VirtualKeyModifiers.Control), New GrapeCity.Xaml.SpreadSheet.UI.SpreadAction(AddressOf GrapeCity.Xaml.SpreadSheet.UI.SpreadActions.InputNewLine))
See Also

Reference

KeyStroke Structure
KeyStroke Members
Overload List