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 {[INDENT]get{ return textField; }[/INDENT][INDENT]set {[/INDENT][INDENT=2]textField = value; ??? Keyboard.AddPreviewKeyDownHandler(???, PreviewKeyDownHandler); ???[/INDENT][INDENT]}[/INDENT] }
private void PreviewKeyDownHandler(object s, KeyEventArgs e) {[INDENT] TextField = SidiExtensions.GetVirtualKeyCode(e.Key);[/INDENT] }
Can someone help me with the eventhandler, how I have to integrate it exactly in the "TextField" property?
Comment