feat: set Margin to 0 for the last TabStripItem.

This commit is contained in:
Zhang Dian
2025-04-09 17:20:38 +08:00
parent 28a1336413
commit 8c0160c310
3 changed files with 8 additions and 2 deletions

View File

@@ -13,7 +13,7 @@
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type TabStrip}" TargetType="TabStrip">
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Template">
<ControlTemplate TargetType="TabStrip">
<Border
@@ -52,7 +52,7 @@
BasedOn="{StaticResource {x:Type TabStrip}}"
TargetType="TabStrip">
<Setter Property="ItemContainerTheme" Value="{StaticResource CardTabStripItem}" />
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Template">
<ControlTemplate TargetType="TabStrip">
<Border

View File

@@ -0,0 +1,5 @@
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style Selector="TabStrip TabStripItem:nth-last-child(1)">
<Setter Property="Margin" Value="0" />
</Style>
</Styles>

View File

@@ -1,3 +1,4 @@
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StyleInclude Source="avares://Semi.Avalonia/Styles/TabControl.axaml" />
<StyleInclude Source="avares://Semi.Avalonia/Styles/TabStrip.axaml" />
</Styles>