Chapter 8. Multithreading

Internally, WPF leverages multithreading by executing the rendering and composition of elements on a separate thread from the UI thread. However, from the point of view of developers, it is fundamentally a single-threaded apartment (STA) model of threading, like the Windows Forms architecture. Initially, the WPF development team wanted to remove the dependency on the STA model, in favor of a mechanism of thread rental, whereby UI objects could be accessed on any thread. However, this design introduced substantial complexity for singlethreaded applications and made it more difficult to interoperate with existing services (such as the Win32 API, Clipboard, Internet Explorer, and so on).

The fact that WPF objects have STA ...

Get WPF Recipes in C# 2008: A Problem-Solution Approach now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.