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
2275
Highlight all characters when entering control
posted

I'm using the XamMaskedEditor and so far it's doing everything I am needing it to do.  One thing I'd like to do and could use some guidance on is how to cause all text in the control to be highlighted whenever the user clicks or tabs in so that whatever they type overwrites whatever is in there.

Thank you,

Mike

Parents
  • 28407
    posted

    HI,

     You could wrie up the GotFocus event and call the SelectAll method.

     Here the code snippet:
     

    private void xmed_GotFocus(object sender, RoutedEventArgs e)  

           {            XamMaskedEditor xme = sender as XamMaskedEditor;            xme.SelectAll();  

            }

     

     Sincerely,
     Matt
     Developer Support Engineer

Reply Children