diff --git a/demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml index 0388518..5c8a804 100644 --- a/demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml @@ -7,31 +7,49 @@ d:DesignHeight="450" d:DesignWidth="800" mc:Ignorable="d"> + + + + - - - - - - - + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml.cs b/demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml.cs index 1f96477..e785e7a 100644 --- a/demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml.cs +++ b/demo/Semi.Avalonia.Demo/Pages/CarouselDemo.axaml.cs @@ -10,17 +10,5 @@ public partial class CarouselDemo : UserControl public CarouselDemo() { InitializeComponent(); - Previous.Click += OnPreviousClick; - Next.Click += OnNextClick; - } - - private void OnPreviousClick(object sender, RoutedEventArgs args) - { - carousel.Previous(); - } - - private void OnNextClick(object sender, RoutedEventArgs args) - { - carousel.Next(); } } \ No newline at end of file diff --git a/src/Semi.Avalonia/Controls/Carousel.axaml b/src/Semi.Avalonia/Controls/Carousel.axaml index e72b5c2..579face 100644 --- a/src/Semi.Avalonia/Controls/Carousel.axaml +++ b/src/Semi.Avalonia/Controls/Carousel.axaml @@ -1,5 +1,9 @@ - + + @@ -18,4 +22,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +