Skip to content
Merged
Changes from all commits
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
47 changes: 24 additions & 23 deletions EmoTracker/UI/LayoutControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,30 +256,31 @@
Background="Transparent"
SelectedItem="{Binding CurrentTab, Mode=TwoWay}"
Padding="0">
<!-- Set Template directly (local value, highest priority) so the tab-header
strip always renders items in their source/definition order. Using a
Style Selector="TabControl" override inside TabControl.Styles instead
can lose ordering because style setters are evaluated after the Fluent
theme template has already been applied. -->
<TabControl.Template>
<ControlTemplate>
<Grid RowDefinitions="Auto,*">
<ItemsPresenter Name="PART_ItemsPresenter"
Grid.Row="0"
HorizontalAlignment="Center"
Margin="0,3">
<ItemsPresenter.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsPresenter.ItemsPanel>
</ItemsPresenter>
<ContentPresenter Name="PART_SelectedContentHost" Grid.Row="1"
Content="{TemplateBinding SelectedContent}"
ContentTemplate="{TemplateBinding SelectedContentTemplate}" />
</Grid>
</ControlTemplate>
</TabControl.Template>
<TabControl.Styles>
<!-- Style the tab strip area -->
<Style Selector="TabControl">
<Setter Property="Template">
<ControlTemplate>
<Grid RowDefinitions="Auto,*">
<WrapPanel Grid.Row="0" HorizontalAlignment="Center" Margin="0,3">
<ItemsPresenter Name="PART_ItemsPresenter" />
</WrapPanel>
<ContentPresenter Name="PART_SelectedContentHost" Grid.Row="1"
Content="{TemplateBinding SelectedContent}"
ContentTemplate="{TemplateBinding SelectedContentTemplate}" />
</Grid>
</ControlTemplate>
</Setter>
</Style>
<!-- Force the items panel to use horizontal layout -->
<Style Selector="TabControl ItemsPresenter">
<Setter Property="ItemsPanel">
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</Setter>
</Style>
<!-- Custom TabItem template to fully control all visual states -->
<Style Selector="TabItem">
<Setter Property="FontSize" Value="12" />
Expand Down
Loading