Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That IS what the dispatcher is doing, operating on the main thread. You told the main thread to set focus because the object is on the main thread. </p> <p><strong>The problem:</strong></p> <p>The answer lies in why you must do this. <strong>You cannot operate on a windows control in any other thread than the thread it was created on.</strong> You also can't create a control in one thread, and set it as a child of a control in another thread.</p> <p>What this means to you... is that what your boss asked you to do can't be done. The only thing you can do in the background is calculate algorithms. At best, you'll be able to load <em>data</em>, and operate on <em>data</em>, and interpret <em>data</em>, but if you want to have that data be displayed in, or converted into, windows controls, you must do that on the main thread.</p> <p><strong>The only solution:</strong></p> <p>However, you can have multiple UIThreads. Which means you can create multiple <code>Window</code>s. So, the must-do alternative is to create windows on separate threads for each tab content, then host the thread-windows on each tab.</p> <p><a href="http://msdn.microsoft.com/en-us/library/ms741870.aspx" rel="nofollow">Threading windows</a></p> <p><a href="http://www.equals-forty-two.com/2010/11/19/host-a-process-window-in-wpf/" rel="nofollow">Host process window</a></p> <p><a href="http://blogs.msdn.com/b/changov/archive/2009/10/26/hosting-wpf-ui-cross-thread-and-cross-process.aspx" rel="nofollow">Cross thread hosting</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload