2023-01-25 23:52:50 +08:00
|
|
|
<UserControl
|
|
|
|
x:Class="Semi.Avalonia.Demo.Pages.CarouselDemo"
|
|
|
|
xmlns="https://github.com/avaloniaui"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
d:DesignHeight="450"
|
|
|
|
d:DesignWidth="800"
|
|
|
|
mc:Ignorable="d">
|
2023-02-05 22:30:01 +08:00
|
|
|
<UserControl.Styles>
|
2024-11-19 14:49:56 +08:00
|
|
|
<Style Selector="Carousel">
|
2023-02-05 22:30:01 +08:00
|
|
|
<Setter Property="Height" Value="200" />
|
2024-11-20 17:06:08 +08:00
|
|
|
<Style Selector="^ TextBlock">
|
|
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
|
|
<Setter Property="Foreground" Value="#1C1F23" />
|
|
|
|
</Style>
|
2023-02-05 22:30:01 +08:00
|
|
|
</Style>
|
2024-11-20 17:06:08 +08:00
|
|
|
<Style Selector="RadioButton">
|
|
|
|
<Setter Property="Theme" Value="{DynamicResource ButtonRadioButton}" />
|
2023-02-05 22:30:01 +08:00
|
|
|
</Style>
|
|
|
|
</UserControl.Styles>
|
2023-01-25 23:52:50 +08:00
|
|
|
<StackPanel Spacing="20">
|
2024-11-19 14:49:56 +08:00
|
|
|
<Carousel Theme="{DynamicResource FullCarousel}"
|
2024-11-20 17:06:08 +08:00
|
|
|
Classes.Dot="{Binding #DotButton.IsChecked}"
|
|
|
|
Classes.Columnar="{Binding #ColumnarButton.IsChecked}"
|
|
|
|
Classes.Line="{Binding #LineButton.IsChecked}"
|
|
|
|
Classes.Left="{Binding #LeftButton.IsChecked}"
|
|
|
|
Classes.Center="{Binding #CenterButton.IsChecked}"
|
|
|
|
Classes.Right="{Binding #RightButton.IsChecked}">
|
2023-02-05 22:30:01 +08:00
|
|
|
<Border Background="#EAF5FF">
|
|
|
|
<TextBlock Text="Text 1" />
|
|
|
|
</Border>
|
|
|
|
<Border Background="#F9F9F9">
|
|
|
|
<TextBlock Text="Text 2" />
|
|
|
|
</Border>
|
|
|
|
<Border Background="#FFF8EA">
|
|
|
|
<TextBlock Text="Text 3" />
|
|
|
|
</Border>
|
|
|
|
<Border Background="#FEF2ED">
|
|
|
|
<TextBlock Text="Text 4" />
|
|
|
|
</Border>
|
|
|
|
</Carousel>
|
2024-11-20 17:06:08 +08:00
|
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="Type" />
|
|
|
|
<Border Theme="{DynamicResource RadioButtonGroupBorder}">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<RadioButton
|
|
|
|
Name="DotButton"
|
|
|
|
IsChecked="True"
|
|
|
|
Content="Dot" />
|
|
|
|
<RadioButton
|
|
|
|
Name="ColumnarButton"
|
|
|
|
Content="Columnar" />
|
|
|
|
<RadioButton
|
|
|
|
Name="LineButton"
|
|
|
|
Content="Line" />
|
|
|
|
</StackPanel>
|
2024-01-26 18:59:40 +08:00
|
|
|
</Border>
|
2024-11-20 17:06:08 +08:00
|
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
|
|
<TextBlock VerticalAlignment="Center" Text="Position" />
|
|
|
|
<Border Theme="{DynamicResource RadioButtonGroupBorder}">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<RadioButton
|
|
|
|
Name="LeftButton"
|
|
|
|
IsChecked="True"
|
|
|
|
Content="Left" />
|
|
|
|
<RadioButton
|
|
|
|
Name="CenterButton"
|
|
|
|
Content="Center" />
|
|
|
|
<RadioButton
|
|
|
|
Name="RightButton"
|
|
|
|
Content="Right" />
|
|
|
|
</StackPanel>
|
2024-01-26 18:59:40 +08:00
|
|
|
</Border>
|
2024-11-20 17:06:08 +08:00
|
|
|
</StackPanel>
|
2023-01-25 23:52:50 +08:00
|
|
|
</StackPanel>
|
2024-11-19 14:49:56 +08:00
|
|
|
</UserControl>
|