Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Make tab same color as the tab content in WPF

Posted on 2009-04-21
Medium Priority
Last Modified: 2013-11-12
I am trying to make the selected tab to be same color as the tab content and the other tab to be gray out.

For example in the attached image, I would like to make 'First' tab blue as the content is blue too.

Does anyone what I need to do that.  Thanks
<Window x:Class="tbTest.Window1"
    Title="Window1" Height="300" Width="300">
        <Style TargetType="TabControl" x:Key="SelectedBackgroundStyle">
            <Setter Property="Background"
                    Value="{Binding SelectedItem.Background, RelativeSource={x:Static RelativeSource.Self}}">
        <TabControl x:Name="Tabs" Style="{StaticResource SelectedBackgroundStyle}" Margin="36,60,37,12">
            <TabItem Header="First" Background="Blue">
                <TextBlock Height="144" Width="257">Test</TextBlock>
            <TabItem Header="Second" Background="Green"/>
            <TabItem Header="Third"  Background="Orange"/>

Open in new window

Question by:xewoox
1 Comment

Accepted Solution

unmeshdave earned 2000 total points
ID: 24247362

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
Network ports are the threads that hold network communication together. They are an essential part of networking that can be easily ignore or misunderstood, my goals is to show those who don't have a strong network foundation how network ports opera…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question