Hello,
I have a simple WPF application where user is able to minimize my application window.
After user restores Window from minimized state I need to set focus to certain TextBox.
If user before minimizing Window has not changed focus, then after restoring application everything is fine.
But problem comes when user has changed focused.
My Window has Activated event handler. And the code is following:
private void Window_Activated(object sender, EventArgs e)
{
if (isFullView)
tbSearch.Focus();
else
tbSearch2.Focus();
}
After Window is restored from minimized state, event handler gets fired, but TextBox tbSearch does not recieve focus.
I'm I doing something wrong?
Thank You!