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
405
Select all text when entering the control
posted

I am still trying to understand WPF coming from WInForms.  In Forms there was a property to select the text (or number) when the control got focus.   Is there a way to do this with the WPF Editors in VB.NET, or XAML?

Parents
  • 27093
    posted

    Hello,

     

    I can’t think of a property you can use right away. What you can do is handle the EditModeStarting or the EditModeStarted event and use the SelectAll method like so:

     

    private void xamTextEditor1_EditModeStarting(object sender, Infragistics.Windows.Editors.Events.EditModeStartingEventArgs e)

    {

        xamTextEditor1.SelectAll();

    }       

     

    Let me know if this helps and if you require any further assistance.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support

Reply Children