WPF TabControl ControlTemplate

controltemplatetabcontrolwpf

I'm looking to create a new control template for a WPF tabcontrol.

The situation I have is that there will be a number of tabs in the control and the user will be able to add and delete these tabs.

Ideally I would like to create something along the lines of the Firefox / IE tabs whereby you have a delete button inside the tab heading to delete the current tab.

Also, and slightly more complicated, I want to have a new tab button that is always on the right hand side of the last tab in the tabcontrol.

Could anyone point me in a direction to get started? I've seen examples of people using Blend for this to create the new template. So far I've not been using that but have just downloaded the trial…

Thanks.

Best Answer

In this article (referred to MVVM) the author make use of control templates to style the tabs, with close button et al.

alt text

Or you can go more basic with this sample

alt text