Adding tabs
As shown in the requirements section earlier, in this chapter, our Northwind application needs to support a tabbed display. MVVM greatly simplifies the creating and managing of tabs as you can have the binding system map views to view models. This makes adding a tabbed interface to our UI a simple matter of using the Hierarchical View Model approach along with some basic OOD techniques.
Note
Hierarchical View Model will be discussed in detail in Chapter 6, Hierarchical View Model and IoC.
To accomplish this, follow the steps listed here:
Add a new class called
ToolViewModel.cs
to theNorthwind.ViewModel
project, and update the code as follows:namespace Northwind.ViewModel { public class ToolViewModel { public string DisplayName { get; set; } } public class AToolViewModel : ToolViewModel { public AToolViewModel() { DisplayName = "A"; } } public class BToolViewModel : ToolViewModel { public BToolViewModel...