2026-04-03 19:28:31 -05:00
|
|
|
<Styles xmlns="https://github.com/avaloniaui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2026-06-06 05:49:24 -05:00
|
|
|
xmlns:local="clr-namespace:LANCommander.Launcher.Controls">
|
2026-04-03 19:28:31 -05:00
|
|
|
|
|
|
|
|
<Style Selector="local|CarouselControl">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<ControlTemplate>
|
|
|
|
|
<!-- Single grid so title column aligns with the clip-panel column -->
|
|
|
|
|
<Grid RowDefinitions="Auto,Auto">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="CarouselNav" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="CarouselNav" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
<!-- Row 0: header — title in col 1, "See all" in col 2 (both align with items/right-button) -->
|
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
|
|
|
|
Text="{TemplateBinding Title}"
|
|
|
|
|
FontSize="18" FontWeight="SemiBold"
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
Margin="0,0,0,10"
|
|
|
|
|
IsVisible="{TemplateBinding Title, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" />
|
2026-04-07 23:07:06 -05:00
|
|
|
|
|
|
|
|
<IconButton Grid.Row="0" Grid.Column="1"
|
|
|
|
|
Text="See all"
|
|
|
|
|
Classes="Text"
|
|
|
|
|
Command="{TemplateBinding SeeAllCommand}"
|
|
|
|
|
IsVisible="{TemplateBinding SeeAllCommand, Converter={x:Static ObjectConverters.IsNotNull}}"
|
|
|
|
|
Padding="8,4"
|
|
|
|
|
Margin="0, 0, 0, 10"
|
|
|
|
|
Size="12"
|
|
|
|
|
Opacity="0.6"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
IconType="Regular"
|
|
|
|
|
IconValue="CaretRight"
|
|
|
|
|
IconPlacement="Right" />
|
2026-04-03 19:28:31 -05:00
|
|
|
|
|
|
|
|
<!-- Row 1: left button | clipped items | right button -->
|
|
|
|
|
<Button x:Name="PART_LeftButton"
|
|
|
|
|
Grid.Row="1" Grid.Column="0"
|
|
|
|
|
Classes="Text"
|
|
|
|
|
HorizontalAlignment="Center"
|
2026-04-04 17:52:52 -05:00
|
|
|
VerticalAlignment="Stretch"
|
2026-04-23 03:06:27 -05:00
|
|
|
Padding="8,6"
|
2026-05-26 00:14:13 -05:00
|
|
|
ZIndex="1"
|
|
|
|
|
Focusable="False"
|
|
|
|
|
IsTabStop="False">
|
2026-04-07 23:07:06 -05:00
|
|
|
<Icon Type="Regular" Value="CaretLeft" Width="16" Height="16" />
|
2026-04-04 17:52:52 -05:00
|
|
|
</Button>
|
2026-04-03 19:28:31 -05:00
|
|
|
|
|
|
|
|
<Panel x:Name="PART_ClipPanel" Grid.Row="1" Grid.Column="1" ClipToBounds="False">
|
|
|
|
|
<Border x:Name="PART_ItemsContainer">
|
|
|
|
|
<ItemsControl x:Name="PART_ItemsControl"
|
|
|
|
|
ItemsSource="{TemplateBinding ItemsSource}"
|
|
|
|
|
ItemTemplate="{TemplateBinding ItemTemplate}"
|
|
|
|
|
ClipToBounds="False">
|
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
|
<StackPanel Orientation="Horizontal"
|
|
|
|
|
Spacing="{Binding Gap, RelativeSource={RelativeSource AncestorType=local:CarouselControl}}" />
|
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</Border>
|
|
|
|
|
</Panel>
|
|
|
|
|
|
|
|
|
|
<Button x:Name="PART_RightButton"
|
|
|
|
|
Grid.Row="1" Grid.Column="2"
|
|
|
|
|
Classes="Text"
|
|
|
|
|
HorizontalAlignment="Center"
|
2026-04-04 17:52:52 -05:00
|
|
|
VerticalAlignment="Stretch"
|
2026-04-23 03:06:27 -05:00
|
|
|
Padding="8,6"
|
2026-05-26 00:14:13 -05:00
|
|
|
ZIndex="1"
|
|
|
|
|
Focusable="False"
|
|
|
|
|
IsTabStop="False">
|
2026-04-07 23:07:06 -05:00
|
|
|
<Icon Type="Regular" Value="CaretRight" Width="16" Height="16" Color="White" />
|
2026-04-04 17:52:52 -05:00
|
|
|
</Button>
|
2026-04-03 19:28:31 -05:00
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
</Styles>
|