diff --git a/Material.Avalonia.Demo/MainView.axaml b/Material.Avalonia.Demo/MainView.axaml index a82f9492..2f330427 100644 --- a/Material.Avalonia.Demo/MainView.axaml +++ b/Material.Avalonia.Demo/MainView.axaml @@ -65,6 +65,7 @@ Home Badges Buttons + Carousel Card ColorZones Colors @@ -161,7 +162,10 @@ - + + + + diff --git a/Material.Avalonia.Demo/Pages/CarouselDemo.axaml b/Material.Avalonia.Demo/Pages/CarouselDemo.axaml new file mode 100644 index 00000000..3b75bc23 --- /dev/null +++ b/Material.Avalonia.Demo/Pages/CarouselDemo.axaml @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Material.Avalonia.Demo/Pages/CarouselDemo.axaml.cs b/Material.Avalonia.Demo/Pages/CarouselDemo.axaml.cs new file mode 100644 index 00000000..1e4214d5 --- /dev/null +++ b/Material.Avalonia.Demo/Pages/CarouselDemo.axaml.cs @@ -0,0 +1,9 @@ +using Avalonia.Controls; + +namespace Material.Avalonia.Demo.Pages; + +public partial class CarouselDemo : UserControl { + public CarouselDemo() { + InitializeComponent(); + } +} diff --git a/Material.Styles/Assists/PipsPagerAssist.cs b/Material.Styles/Assists/PipsPagerAssist.cs new file mode 100644 index 00000000..d10e30c3 --- /dev/null +++ b/Material.Styles/Assists/PipsPagerAssist.cs @@ -0,0 +1,27 @@ +using Avalonia; +using Avalonia.Controls; +using Material.Styles.Enums; + +namespace Material.Styles.Assists +{ + public static class PipsPagerAssist + { + public static readonly AttachedProperty PipShapeProperty = + AvaloniaProperty.RegisterAttached("PipShape", typeof(PipsPagerAssist), PipShape.Dot); + + public static void SetPipShape(AvaloniaObject element, PipShape value) => + element.SetValue(PipShapeProperty, value); + + public static PipShape GetPipShape(AvaloniaObject element) => + element.GetValue(PipShapeProperty); + + static PipsPagerAssist() { + PipShapeProperty.Changed.AddClassHandler((pager, args) => { + var newValue = args.GetNewValue(); + pager.Classes.Set("pip-dot", newValue == PipShape.Dot); + pager.Classes.Set("pip-pill", newValue == PipShape.Pill); + pager.Classes.Set("pip-number", newValue == PipShape.Number); + }); + } + } +} \ No newline at end of file diff --git a/Material.Styles/Enums/PipShape.cs b/Material.Styles/Enums/PipShape.cs new file mode 100644 index 00000000..09e8a3c5 --- /dev/null +++ b/Material.Styles/Enums/PipShape.cs @@ -0,0 +1,7 @@ +namespace Material.Styles.Enums; + +public enum PipShape { + Dot, + Pill, + Number +} \ No newline at end of file diff --git a/Material.Styles/MaterialToolKit.xaml b/Material.Styles/MaterialToolKit.xaml index 19e372db..e8fc7fbe 100644 --- a/Material.Styles/MaterialToolKit.xaml +++ b/Material.Styles/MaterialToolKit.xaml @@ -66,6 +66,7 @@ + diff --git a/Material.Styles/Resources/Themes/PipsPager.axaml b/Material.Styles/Resources/Themes/PipsPager.axaml new file mode 100644 index 00000000..8a8127e1 --- /dev/null +++ b/Material.Styles/Resources/Themes/PipsPager.axaml @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +