Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your best bet, to ensure a consistent behavior and appearance across operating systems, would be to re-template the TabItem control and then use a Trigger to modify a part of your new template when a TabItem is selected. Try something like the following: </p> <pre><code>&lt;Grid&gt; &lt;Grid.Resources&gt; &lt;Style x:Key="Custom"&gt; &lt;Setter Property="Control.Background" Value="#FF47C7C8"/&gt; &lt;Setter Property="Control.BorderBrush" Value="#FF47C7C8"/&gt; &lt;Setter Property="Control.Foreground" Value="White"/&gt; &lt;/Style&gt; &lt;Style BasedOn="{StaticResource Custom}" TargetType="TabControl"/&gt; &lt;Style TargetType="TabItem"&gt; &lt;Setter Property="Foreground" Value="White"/&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type TabItem}"&gt; &lt;Grid&gt; &lt;Border Name="Border" Background="#FF47C7C8" BorderBrush="#FFFFFF" BorderThickness="1,1,1,1" CornerRadius="2,2,0,0"&gt; &lt;ContentPresenter x:Name="ContentSite" HorizontalAlignment="Center" Margin="12,2,12,2" VerticalAlignment="Center" ContentSource="Header" RecognizesAccessKey="True"/&gt; &lt;/Border&gt; &lt;/Grid&gt; &lt;ControlTemplate.Triggers&gt; &lt;Trigger Property="IsSelected" Value="True"&gt; &lt;Setter Property="Panel.ZIndex" Value="100"/&gt; &lt;Setter TargetName="Border" Property="Background" Value="#FF47C7C8"/&gt; &lt;Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0"/&gt; &lt;/Trigger&gt; &lt;/ControlTemplate.Triggers&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;/Grid.Resources&gt; &lt;TabControl&gt; &lt;TabItem Header="Item 1"/&gt; &lt;TabItem Header="Item 2"/&gt; &lt;TabItem Header="Item 3"/&gt; &lt;TabItem Header="Item 4"/&gt; &lt;/TabControl&gt; </code></pre> <p></p> <p>Bon chance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload