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
}}
Hi,
I guess you are talking about something like conditions in multitriggers?
And you goal is to know when you press Enter/Return key?
Correct?
Hi Anastas,
I am trying to achieve this using a callmethodaction.
I have a xamtexteditor box and I want to call a method on my viewmodel when Enter/Return key is pressed.
I understand i need to add a condition. Do you know what can i add as condition?
Thanks,
Uday Thummalapalli
That helped me alot thanks. I get it now working as I wanted it to work ;)
Hello,
I think that the two events EditModeEnding and EditModeEnded will help you.
When you press Enter first the EditModeEnding event is fired and after that EditModeEnded event.
Note: this events are also fired when focus is lost from xamTextEditor.
I hope this helps.
Best regards,
Anastas