The How to make a loading graphic in WPF XAML? question on stackoverflow reminded me, that I wanted to write a short piece about the WPF infrastructure I’m currently writing. A first part was the Doing GUI architecture the Right Way where I describe the basic advantages of the View Model. Today I’m going to show some details of how this enables very smooth removal of background tasks from the UI Thread. Beware that this is work in progress, so edges might be rough.
The basic structure is three-fold: the Model where the actual data resides, the View which interacts with the user and the View Model as a intermediate layer. I will start out with describing the View, which is really thin. Afterwards I’ll talk a bit why the Model alone is not enough. In the last part I’ll describe my approach to filling the gap.