Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Placement fix for TabControl header when left or right
  • Loading branch information
MichelMichels committed Dec 26, 2021
commit 0820e76ba52a489b32b8e26fb02b07182b0c2ab8
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
</Setter>
</Style>


<Style x:Key="MaterialDesignTabControl" TargetType="{x:Type TabControl}">
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
Expand All @@ -42,6 +41,7 @@
<DockPanel KeyboardNavigation.TabNavigation="Local">
<wpf:ColorZone
x:Name="PART_ColorZone"
VerticalAlignment="Stretch"
wpf:ShadowAssist.ShadowDepth="{TemplateBinding wpf:ShadowAssist.ShadowDepth}"
wpf:ShadowAssist.ShadowEdges="{TemplateBinding wpf:ShadowAssist.ShadowEdges}"
DockPanel.Dock="Top"
Expand All @@ -51,6 +51,7 @@
<UniformGrid
x:Name="HeaderPanel"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="Top"
Focusable="False"
IsItemsHost="True"
KeyboardNavigation.TabIndex="1"
Expand Down Expand Up @@ -100,13 +101,6 @@
</Setter>
</Style>

<Style
x:Key="MaterialDesignFilledTabControl"
BasedOn="{StaticResource MaterialDesignTabControlBase}"
TargetType="{x:Type TabControl}">
<Setter Property="wpf:ColorZoneAssist.Mode" Value="PrimaryMid" />
</Style>

<Style x:Key="MaterialDesignTabItem" TargetType="{x:Type TabItem}">
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}" />
<Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}" />
Expand All @@ -117,7 +111,7 @@
<Setter Property="MinWidth" Value="90" />
<Setter Property="MaxWidth" Value="360" />
<Setter Property="wpf:RippleAssist.Feedback" Value="{DynamicResource MaterialDesignFlatButtonRipple}" />
<Setter Property="wpf:ColorZoneAssist.Mode" Value="PrimaryMid" />
<Setter Property="wpf:ColorZoneAssist.Mode" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(wpf:ColorZoneAssist.Mode)}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
Expand Down