In the previous article, we talked about customizing the tabcontrol control to implement the tabitem close button. However, to implement a beautiful tabcontrol style, such as the tab style of visualstudio2010, we still have to work hard to customize it. JuneProgramGoodDrag Control, Not goodArtistThis year, programmers are too busy, good artists, and good interface designers are hard to recruit. This weekend, I have nothing to worry about. Let's play with the control style. The main reference document is msdn. The final control effect is as follows:
Another unselected style also has a background:
Another style is like this with no background color:
The normal, Mouseover, selected, and unselected statuses are implemented using the controltemplate of custom tabcontrol and tabitem, and the close button of tabitem is bound to viewmodel in mvvm mode.
Source code: mainpage. XAML
If you need source code, click here to download the source code. Have a good weekend!