Toolwindows in separate threads

Docking/MDI for WPF Forum

Posted 8 years ago by Bret Naughton
Version: 11.2.0550
Avatar
Hi,

I have developed an application that allows the user to create many toolwindows on the fly (dashboard type environment) and also create individual toolwindows within each of these parent toolwindows. Each of these children can contain a various graphical module (charts; datagrids; other visualisation tools).
So, the layout is

Parent ToolWindow Parent ToolWindow Parent ToolWindow
- Child ToolWindow - Child ToolWindow - Child ToolWindow
- Child ToolWindow - Child ToolWindow - Child ToolWindow
- Child ToolWindow - Child ToolWindow
- Child ToolWindow

Unfortunately I am suffering from the issue that the entire WPF app stops due to running the 'UI' on the single thread, when I try to create a single Child Tool Window with the appropriate visualisation content. (Or if I try to render or recalculate the contents of a toolwindow).

So, I am now looking at how I could create each of these windows on a separate thread so that I could be analysing the contents of one 'Parent ToolWindow',while a 'Child ToolWindow' renders/calculates in another 'Parent ToolWindow'.

Just wondering if you have any examples of achieving this through any current Actipro examples. I am able to create each toolwindow when initialized as a separate thread. However, I am having trouble accessing the appropriate window as everything is now running on a separate thread.

For instance I am adding the toolwindow on one thread to the docksite of the parent, but of course it is running on another thread.

ParentDockSite.ToolWindows.Add(ChildToolWindow)

Do you know if this is possible and how I could achieve this?. Sorry if this is a non-Actipro issue, but I have looked all over the web and I cannot see how I can reference a toolwindow that belongs to another thread.

Thanks
Bret

Comments (2)

Posted 8 years ago by Bret Naughton
Avatar
Sorry, I have just seen a previous post that the request I have is not possible as all toolwindows must be using the same thread as the parent... but presuming that if I have 3 toolwindows I want to create simultaneously with graphics in, I can create the toolwindows first, then send the actual 'Work' routines (i.e. the gettng data & rendering the graph) as a separate thread - hopefully so that the 3 separate threads can be worked on pretty much at the same time and the graphics rendered simultaneously for all 3 toolwindows.

Thanks,
Bret
Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Bret,

That's correct, WPF (and thus our Docking & MDI product) does not support having controls in the same visual tree on different threads. This article explains some ways you can make your applications more responsive, but this may not help in your scenario.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.