Thumbnail View Resource
Source (The Code Project), posted 2010-05-27

Added By

Avatar BillHenn on 2010-05-30

  • 7212 total views
Shows how to add a Close button to a WPF TabItem. The Close button only shows on the selected tab.
"During a recent project, I had a need for a "Close button" on tabs, similar to that in Visual Studio 2010. While trying to find out how to do this, I found several examples on the Internet. Many of these examples used header templates for the TabItem that used nothing but XAML or XAML mixed with some C# code. Other examples had extra features, like making the tab header a different shape, which I did not need. Although I did have a header template that sort of worked the way I wanted it to, it wasn't perfect. And, since I am not that comfortable with XAML anyways (as I come from a WinForms background), I decided to go another route. I know there are probably simpler ways to accomplish this, but the following solution felt simple and straightforward to me, and hopefully someone else finds it useful."
Full Link

About The Code Project

The Code Project is a community of software development and design developers joined together with certain common goals: to learn, to teach and to have fun programming. Developers from all over the world come together to share source code, tutorials and knowledge for free to help their fellow programmers. It is extremely popular and is one of the best places on the web to look for open source implementations of .NET control, components, and techniques.

The WPFpedia resource guide has 238 total links to this site.


Avatar edubah


There aren't any comments yet for this resource. Be the first to add one!

Add a Comment

Please log in to post comments.



Thumbnail Screenshots by Thumbshots