Automatically restore focus

Docking/MDI for WPF Forum

Posted 6 years ago by Miguel A.
Version: 18.1.0672
Platform: .NET 4.7
Environment: Windows 10 (64-bit)
Avatar

Hi, when a toolwindow has got focus and I open a dialog or messagebox in code and the user closes it, the focus is set to the first control in the toolwindow instead of the control which were focused the last. How can I restore focus to the last focused control? Preferrably with one code change only and without having to make changes in all tool window classes instead.

[Modified 6 years ago]

Comments (3)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Miguel,

Are you using Microsoft's Win32 dialogs (like MessageBox, OpenFileDialog, etc.) here? 

Does it happen if you open a WPF-based dialog Window instead?


Actipro Software Support

Posted 6 years ago by Miguel A.
Avatar

Hi,

i'm using WPF windows only

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Miguel,

While we couldn't duplicate the exact issue, we might have found something similar when clicking docking window tabs that we updated our code for.  Can you email our support address a new simple sample project showing the issue you're seeing?  Then we can test our update to see if that resolved it or not.  Please remove any bin/obj folders from the ZIP you send, and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.