O'Reilly logo

WPF in Action with Visual Studio 2008 by Maxx Daymon, Arlen Feldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 21. Threading

This chapter covers:

  • The Dispatcher
  • Asynchronous calls
  • Timers
  • Making our CIA application more insulting

In Windows Forms, the cardinal rule for threading was that all UI operations had to take place on the same thread—or, at least, on the thread that created the window with which you were working. Although the mechanics are a little bit different, the same exact rule applies to WPF.

WPF has two UI threads: the main UI thread and a rendering thread, which does the real rendering, animation, and so on. But, you can almost never interact with the rendering thread; for practical purposes, you can ignore it. In threading situations, you have to make sure that all your UI calls take place on the main UI thread.

There are a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required