In the previous entry I mentioned that the project’s UI design required me to create an interface similar to the Office 2007 UI. I decided to start with seems to be a simple part: tab control. In the proposed design it looks like that:

While the standard Tab looks like this:
So I started to play with the available properties of the Tab control in XAML. While I managed to apply the appropriate gradient backgrounds, I still needed to modify the shape of the tabs and the background of selected tabs.
The internet search yielded the suggestion to use the Interactive Designer to create a custom template and style for the standard WPF’s TabControl. And I desided to fiddle with the Interactive Designer, thinking that if this tool is created for a non programmer type in mind, I should be able to figure it out pretty easy. I took the Martin’s guide for creation of a glass button and tried to follow the steps to create a required style for the Tab. That was a mistaken assumption. I immediately got lost in the hierarchy of the objects. After many tries, I finally came upon the SimpleStyles sample which is a part of the .NET 3.0 SDK. It is located in the Controls\ControlTemplateExamples\XAML folder and contains minimal templates for all standard controls. So I took the template for the Tab control as a base and using the VS started modifying XAML by hand. As it occurred later, this was the best decision for me to get things done. Every time I needed to get the custom style for a standard control, the SimpleStyles sample proved to be the best way to approach creation of the custom templates.
You can download the resulting XAML from here:
TabControlCustom.zip (1.46 KB)