c# - No overload for 'txtSearch_KeyDown' matches delegate 'System.Windows.Input.KeyEventHandler' -
i creating function check if user presses enter while text box in focus. im getting error
error 1 no overload 'txtsearch_keydown' matches delegate 'system.windows.input.keyeventhandler'
private void txtsearch_keydown(object sender, system.windows.forms.keyeventargs f) { if (f.keycode.equals(key.enter)) {
and xaml code text box
<textbox x:name="txtsearch" canvas.left="144" canvas.top="190" width="392" height="33" " keydown=" txtsearch_keydown"/>
you got wrong parameter-signature, because of type mismatch. system.windows.input.keyeventargs
not system.windows.forms.keyeventargs
.
Comments
Post a Comment