KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am writing a small WPF app which spawns some number of threads to stress test a page of a website. I would like to output some information in the textbox of the wpf form of state of the thread I am manually starting from the main WPF thread. I was kind of expecting the WPF to have the same capabilities as far as synchronizing my threads back to the GUI thread through: if(this.InvokeRequired) this.Invoke(ProcessState); However there is nothing of the sorts in the WPF... what are the options to do the output from a non-gui thread in WPF? Edit: The issue now appears to be in the fact that I am not able to check for the method CheckAccess() of the Dispatcher object of my control. I am running the 3.5 version of .net and VS 2008 SP1. Here is the full metadata of my Dispatcher Class (F12 on it): using MS.Internal.WindowsBase; using System; using System.ComponentModel; using System.Security; using System.Threading; namespace System.Windows.Threading { // Summary: // Provides services for managing the queue of work items for a thread. public sealed class Dispatcher { // Summary: // Gets the System.Windows.Threading.Dispatcher for the thread currently executing // and creates a new System.Windows.Threading.Dispatcher if one is not already // associated with the thread. // // Returns: // The dispatcher associated with the current thread. public static Dispatcher CurrentDispatcher { get; } // // Summary: // Determines whether the System.Windows.Threading.Dispatcher has finished shutting // down. // // Returns: // true if the dispatcher has finished shutting down; otherwise, false. public bool HasShutdownFinished { get; } // // Summary: // Determines whether the System.Windows.Threading.Dispatcher is shutting down. // // Returns
Tags (comma-separated)
Save Edits
Cancel