Skip to content

Commit

Permalink
完成基本效果
Browse files Browse the repository at this point in the history
  • Loading branch information
Coolkeke committed Jan 4, 2025
1 parent ad68902 commit d2371fe
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/LayuiPack/Models/LayuiFundamentalElement/Views/TabControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,31 @@
ItemsSource="{Binding PageList}"
SelectedItem="{Binding PageModel}"
Type="Card">
<Lay:LayTabControl.ItemContainerStyle>
<Style BasedOn="{StaticResource LayTabItemStyle}" TargetType="Lay:LayTabItem">
<Setter Property="Padding" Value="0" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Style>
</Lay:LayTabControl.ItemContainerStyle>
<Lay:LayTabControl.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<TextBlock VerticalAlignment="Center" Text="{Binding Title}" />
<TextBlock
Margin="10,0"
VerticalAlignment="Center"
Text="{Binding Title}" />
<Lay:LayButton
Grid.Column="1"
Width="20"
Height="20"
Margin="10,0,0,0"
Margin="5,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Command="{Binding RelativeSource={RelativeSource AncestorType=Lay:LayTabControl}, Path=DataContext.DeleteCommand}"
CommandParameter="{Binding}"
Content="X" />
Expand Down

0 comments on commit d2371fe

Please sign in to comment.