# How to: Change Tab Appearance in DXTabControl when a Tab Is Selected, Focused Or Hovered | WPF Controls | DevExpress Documentation

The following example uses the properties of the `TabBorder` internal class to change the tab appearance:

- XAML

<section id="tabpanel_I5m-PmI67e_tabid-xaml" role="tabpanel" data-tab="tabid-xaml">
<pre><code class="lang-xaml">&lt;dx:ThemedWindow
        xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
        xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
        xmlns:dx=&quot;http://schemas.devexpress.com/winfx/2008/xaml/core&quot; 
        xmlns:dxe=&quot;http://schemas.devexpress.com/winfx/2008/xaml/editors&quot;
        xmlns:dxb=&quot;http://schemas.devexpress.com/winfx/2008/xaml/bars&quot;
        xmlns:dxcn=&quot;http://schemas.devexpress.com/winfx/2008/xaml/core/internal&quot; 
        xmlns:dxmvvm=&quot;http://schemas.devexpress.com/winfx/2008/xaml/mvvm&quot;
        dx:ThemeManager.ThemeName=&quot;Office2013&quot;
        x:Class=&quot;DXTabControlExample.MainWindow&quot;
        Title=&quot;Theming&quot; Height=&quot;350&quot; Width=&quot;550&quot;&gt;
    &lt;Window.Resources&gt;
        &lt;DataTemplate x:Key=&quot;TabControlBackground&quot;&gt;
            &lt;dxcn:TabBorder ViewInfo=&quot;{Binding}&quot; BorderBrush=&quot;Wheat&quot; BorderThickness=&quot;1&quot; BorderBackground=&quot;Azure&quot; BackgroundMode=&quot;BorderBackground&quot; BorderMode=&quot;BorderBrush&quot;/&gt;
        &lt;/DataTemplate&gt;

        &lt;DataTemplate x:Key=&quot;TabItemNormalBackground&quot;&gt;
            &lt;dxcn:TabBorder ViewInfo=&quot;{Binding}&quot; BorderBackground=&quot;PeachPuff&quot; 
                            BorderCornerRadius=&quot;5,5,0,0&quot;
            BackgroundMode=&quot;BorderBackground&quot; BorderMode=&quot;BorderBrush&quot; BorderThickness=&quot;1,1,1,0&quot; BorderMargin=&quot;0,0,1,0&quot; HoldBorderThickness=&quot;2&quot; HoldBorderMargin=&quot;0,0,2,2&quot;/&gt;
        &lt;/DataTemplate&gt;
        &lt;DataTemplate x:Key=&quot;TabItemHoverBackground&quot;&gt;
            &lt;dxcn:TabBorder ViewInfo=&quot;{Binding}&quot; BorderBackground=&quot;PapayaWhip&quot; BorderBrush=&quot;Wheat&quot; 
                            BorderCornerRadius=&quot;5,5,0,0&quot;
            BackgroundMode=&quot;BorderBackground&quot; BorderMode=&quot;BorderBrush&quot; BorderThickness=&quot;1,1,1,0&quot; BorderMargin=&quot;0,0,1,0&quot; HoldBorderThickness=&quot;2&quot; HoldBorderMargin=&quot;0,0,2,2&quot;/&gt;
        &lt;/DataTemplate&gt;
        &lt;DataTemplate x:Key=&quot;TabItemSelectedBackground&quot;&gt;
            &lt;dxcn:TabBorder ViewInfo=&quot;{Binding}&quot; BorderBackground=&quot;Azure&quot; BorderBrush=&quot;Wheat&quot; 
                            BorderCornerRadius=&quot;5,5,0,0&quot;
            BackgroundMode=&quot;BorderBackground&quot; BorderMode=&quot;BorderBrush&quot; BorderThickness=&quot;1,1,1,0&quot; BorderMargin=&quot;0,-1,1,-1&quot; HoldBorderThickness=&quot;2&quot; HoldBorderMargin=&quot;0,0,2,2&quot;/&gt;
        &lt;/DataTemplate&gt;
        &lt;DataTemplate x:Key=&quot;TabItemFocusedBackground&quot;&gt;
            &lt;dxcn:TabBorder ViewInfo=&quot;{Binding}&quot; BorderBrush=&quot;Brown&quot; 
                            BorderCornerRadius=&quot;5,5,0,0&quot;
                            BorderBackground=&quot;LightCyan&quot; BorderThickness=&quot;0&quot; HoldBorderThickness=&quot;2&quot; HoldBorderMargin=&quot;0,0,2,2&quot; /&gt;
        &lt;/DataTemplate&gt;
    &lt;/Window.Resources&gt;
    &lt;Grid&gt;
        &lt;dx:DXTabControl Name=&quot;tabControl&quot; BackgroundTemplate=&quot;{StaticResource TabControlBackground}&quot;&gt;
            &lt;dx:DXTabControl.ItemContainerStyle&gt;
                &lt;Style TargetType=&quot;dx:DXTabItem&quot;&gt;
                    &lt;Setter Property=&quot;HoverBackgroundTemplate&quot; Value=&quot;{StaticResource TabItemHoverBackground}&quot;/&gt;
                    &lt;Setter Property=&quot;NormalBackgroundTemplate&quot; Value=&quot;{StaticResource TabItemNormalBackground}&quot;/&gt;
                    &lt;Setter Property=&quot;SelectedBackgroundTemplate&quot; Value=&quot;{StaticResource TabItemSelectedBackground}&quot;/&gt;
                    &lt;Setter Property=&quot;FocusedBackgroundTemplate&quot; Value=&quot;{StaticResource TabItemFocusedBackground}&quot;/&gt;
                &lt;/Style&gt;
            &lt;/dx:DXTabControl.ItemContainerStyle&gt;
            &lt;dx:DXTabItem Header=&quot;Original Text&quot;&gt;
                &lt;TextBox/&gt;
            &lt;/dx:DXTabItem&gt;
            &lt;dx:DXTabItem Header=&quot;Edited Text&quot;&gt;
                &lt;TextBox/&gt;
            &lt;/dx:DXTabItem&gt;
            &lt;dx:DXTabItem Header=&quot;Result Text&quot;&gt;
                &lt;TextBox/&gt;
            &lt;/dx:DXTabItem&gt;
        &lt;/dx:DXTabControl&gt;
    &lt;/Grid&gt;
&lt;/dx:ThemedWindow&gt;
</code></pre></section>

[View Example: WPF Tab Control - Customize Tab Background for Selected, Focused, and Hovered States](https://github.com/DevExpress-Examples/wpf-tabcontrol-customize-background-based-on-tab-state)