.net - WPF focus textbox after Window is restored/activated from minimized state -


I have a simple WPF application where the user is able to reduce my app window.

After restoring the user window to the minimized state, I need to set the focus on some text box.

If the user does not change the focus before minimizing the window, then after restoring the application everything is fine.

But the problem occurs when the user changes the focus.

My window has an active handler and the code is as follows:

  Private Zero Window_Acted (Object Sender, EventAurge E) {if (fullFiew) tbSearch.Focus (); Else tbSearch2.Focus (); }  

After restoring the window to a minimum, the event handler is removed, but the text box does not receive TB search focus.

Am I doing something wrong?

Thank you!

You must first identify. win. state. View this post with information :.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -