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
120
Focus or StartEditMode on XamMaskedEditor
posted

Hi there,

How do I get the caret back into the XamMaskedEditor control after popping up a MessageBox?  I've tried calling Focus and StartEditMode (and defining the SelectionStart and SelectionLength properties), but they both seemed to go through all of the events: EditModeStarting, EditModeStarted, EditModeEnding, EditModeEnded.  Neither functions stop after EditModeStarted.

Regards,

Annie

 

Parents
No Data
Reply
  • 2070
    posted

    Hi Annie,

     

    All you should need to do is call Focus on the masked editor. I created a small sample to test this out and for me this works. There may be something specific to your app. Can you post a small sample that demonstrates this?

    public void btn_Click( object sender, RoutedEventArgs e )
    {
        MessageBox.Show( this, "Messge Box Text" );

        this.maskedEditor.Focus( );
        this.maskedEditor.SelectionStart = 5;
        this.maskedEditor.SelectionLength = 0;
    }

     

    Sandip 

Children
No Data