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

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -