Focus after IsValidText returns false


I override IsValidText in the TextEditingTool. It works great.

Is it possible to let the focus on the textbox if IsValidText returns false ?

public class QD_TextEditingTool : TextEditingTool
        protected override bool IsValidText(string oldstring, string newstring)
            if (string.IsNullOrEmpty(newstring))
                MessageBox.Show(Session.GetString("errEmptyName", "Vous devez indiquer un nom abrégé"), "Erreur", MessageBoxButton.OK, MessageBoxImage.Exclamation);                            
                return false;
            return base.IsValidText(oldstring, newstring);

I use WPF dll version.


Well, it does maintain logical focus, if not keyboard focus.

We’ll have to investigate this.

By the way, I moved your post from the GoDiagram focum to this, the GoXam forum.