Creating a tabbed user interface
The tabbed user interface has been popular in recent years, due to its screen real estate savings and ease of use. It replaces the older, MDI (Multiple Document Interface) model that exists within the Windows UI subsystem and popularized by frameworks such as MFC (Microsoft Foundation Classes). Visual Studio itself is a good example of tabbed interface usage (although Visual Studio can work in MDI mode as well). In this recipe, we'll see the basics of a tabbed user interface. Check out the There's moreā¦ section for a more realistic way of managing tabs.
Getting ready
Make sure Visual Studio is up and running.
How to do it...
We'll create a bare-bones application showing two simple tabs:
Create a new WPF application named
CH03.SimpleTabs
.Open
MainWindow.xaml
. Replace the existingGrid
with aTabControl
.Add a
TabItem
control to theTabControl
as follows:<TabControl> <Tabitem Header="Header 1"> <Grid> <Ellipse Stroke=...