Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
XamTextEditor KeyDown Event "Hit Return" only triggered when hit ReturnKey twice
posted

Hello I have im using the XamTextEditor as an SearchField and wanted to add there an Eventhandler so when Enter is hitted its calling the searchmethod. 

So the Event works fine for every key but when I hit the first Time return the editor loses focus ? and is framed by dashed lines and the event is not triggered. When I now hit Return in this state the event is triggered. Is there a way how i can change the editor to handle it on the first hit ?

regards 

Mark Buggermann

 

 <igEditors:XamTextEditor Name="TextEditorSuchfeld" />

Page.TextEditorSuchfeld.KeyDown += new KeyEventHandler(GetSearchResults);

 

void GetSearchResults(object parameter, KeyEventArgs ex)

{

 if (ex.Key == Key.Enter)

            {

//some logik

}}