Spread WPF Documentation
KeyMap Property
Example 


GrapeCity.Windows.SpreadSheet.UI Namespace > SheetView Class : KeyMap Property
Gets the key map collection that contains associated keys and actions.
Syntax
'Declaration
 
Public ReadOnly Property KeyMap As System.Collections.Generic.Dictionary(Of KeyStroke,SpreadAction)
'Usage
 
Dim instance As SheetView
Dim value As System.Collections.Generic.Dictionary(Of KeyStroke,SpreadAction)
 
value = instance.KeyMap
public System.Collections.Generic.Dictionary<KeyStroke,SpreadAction> KeyMap {get;}
Example
This example removes and adds keys.
gcSpreadSheet1.View.KeyMap.Remove(new KeyStroke(Key.Enter, ModifierKeys.None));
gcSpreadSheet1.View.KeyMap.Add(new KeyStroke(Key.Enter, ModifierKeys.None), SpreadActions.StartEditing);
gcSpreadSheet1.View.KeyMap.Remove(new KeyStroke(Key.Enter, ModifierKeys.Alt));
gcSpreadSheet1.View.KeyMap.Add(new KeyStroke(Key.M, ModifierKeys.Control), SpreadActions.InputNewLine);
Dim enterKey As New KeyStroke(Key.Enter, ModifierKeys.None)
GcSpreadSheet1.View.KeyMap.Remove(enterKey)
GcSpreadSheet1.View.KeyMap.Add(enterKey, AddressOf SpreadActions.StartEditing)
GcSpreadSheet1.View.KeyMap.Remove(New GrapeCity.Windows.SpreadSheet.UI.KeyStroke(Key.Enter, ModifierKeys.Alt))
GcSpreadSheet1.View.KeyMap.Add(New GrapeCity.Windows.SpreadSheet.UI.KeyStroke(Key.M, ModifierKeys.Control), New GrapeCity.Windows.SpreadSheet.UI.SpreadAction(AddressOf GrapeCity.Windows.SpreadSheet.UI.SpreadActions.InputNewLine))
See Also

Reference

SheetView Class
SheetView Members