After lots of googling, trying to figure out how to multithread properly in .NET and modify a WPF GUI from another thread, I’ve finally figured a lot of stuff out. I have created a simple multithreading example project in Visual C# 2008 Express.
You can download the project here, but since I know most people just want to get some quick answers, here’s a few code snippets:
This following is a member method of a WPF Window.
The following is an example of a member method of a WPF window that runs itself in a separate thread.
The project file contains more examples, including handling multithreaded events, how to create custom delegates, getting thread states, and intelligently killing threads when the program shuts down.