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
60
XamTextEditor does not retain focus after "Enter" key
posted

After typing into the XamTextEditor and hitting the enter key, the keyboard focus does not stay with the XamTextEditor control.  It hasn't completely passed to the next control either.  If seems like it still has visual focus (i.e. the style shows a focused style).  I can no longer type in the XamTextEditor.  How do I force it to retain keyboard focus.

Parents
No Data
Reply
  • 30945
    Verified Answer
    Offline posted

    Hello,

     

    Thank you for your post. I have been reading through it and the behavior that you are describing seems expected. When enter key is pressed the XamTextEditor exits edit mode and it is still on focus. You can start typing again in the editor after pressing the F2 key which puts the XamTextEditro into edit mode. I assume that you wish to be able to enter edit mode when pressing any key while the XamTextEditor is on focus. If my assumption is correct, I can suggest handling the KeyDown event and itf the editor is not in edit mode to call the StartEditMode method. Also you can set the IsAlwaysInEditMode property of the XamTextEditor to True in order to be able to type after enter key is pressed.

     

    I have created a sample application for you which demonstrates the first approach that I have described.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    TextEditorKeepFocusOnEnterKey.zip
Children