If the value is set (the field has lost focus), I would like to call an EventHandler so that I can determine in it which key is currently being pressed.
[Display(ResourceType = typeof(Resource), Order = 1, GroupName = "HotKeys", Name = "Pressed Key", Description = "")] public string TextField {get{ return textField; }set {textField = value; ??? Keyboard.AddPreviewKeyDownHandler(???, PreviewKeyDownHandler); ???}}
private void PreviewKeyDownHandler(object s, KeyEventArgs e) {TextField = SidiExtensions.GetVirtualKeyCode(e.Key);}
Can someone help me with the eventhandler, how I have to integrate it exactly in the "TextField" property?
Comment