recently I decided to implement the WeifenLuo DockPanel Suite into my VB.NET application. Everything works fine, until you try and close the application, where it then freezes. Nothing happens.
I tried:
Yet still nothing,t still simply freezes.
The output shows the following messages:
The thread 0x1f34 has exited with code 259 (0x103).
The thread 0x22b8 has exited with code 259 (0x103).
With the thread names being different each time. However I don't have any threads running.
This only occurs on the form with the DockPanel.
Any thoughts? I can't find anyone else with this issue online, and it is really frustrating.
Thanks.
In the form closing event of my application, I iterated through any open documents in the DockPanel using:
While i < DockPanel1.ActiveDocumentPane.Contents.Count
Dim dockContent As IDockContent = DockPanel1.ActiveDocumentPane.Contents(i)
dockContent.DockHandler.Close()
End While
This is what was causing the application to freeze. To fix this, I replaced the code with this:
For Each item As DockContent In DockPanel1.Documents
item.DockHandler.Close()
Next