ActivatePrimaryDocument does not activate the documentwindow

Docking/MDI for WPF Forum

Posted 11 years ago by Arthur Damen
Version: 10.2.0533
Avatar
I have a question. I have a Docksite with a new loaded document inside.

Next I call the ActivatePrimaryDocument so it is shown.
But the return value is False!
There is a document so it should activate this one.

This is done in a load phase of the application. When I use a timer that goes of after the application is started, it works.

What can I do to force the document to activate in the load phase of a application?


'Dim MainDockSite as DockSite
MainDockSite.ActivatePrimaryDocument
if MainDockSite.ActiveWindow Is Nothing Then
'Should not happen, but it does....
End if

[Modified at 01/14/2011 07:44 AM]

Comments (2)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Arthur,

The "primary document" was the last document to get keyboard focus. Since you are still in the process of loading the DockSite, there isn't a primary document since nothing has had keyboard focus yet. You would need to explicitly pick a document to activate using DocumentWindow.Activate.


Actipro Software Support

Posted 11 years ago by Arthur Damen
Avatar
I found out that when i load the document when window is minimized, i get this problem.
Calling the document.activate does not work to get the main document activated.
Only when loading the window in a non-minimize state solves this...
The latest build of this product (v21.1.3) was released 11 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.