From 592041aa225fb09a2494bba9f965c9617fb09ba4 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Soucy Date: Tue, 26 Sep 2023 13:58:12 -0400 Subject: [PATCH] feat: added PipsPager lightweight styling cm --- .../Theme/PipsPager.cs | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 src/library/Uno.Themes.WinUI.Markup/Theme/PipsPager.cs diff --git a/src/library/Uno.Themes.WinUI.Markup/Theme/PipsPager.cs b/src/library/Uno.Themes.WinUI.Markup/Theme/PipsPager.cs new file mode 100644 index 000000000..c79b9543b --- /dev/null +++ b/src/library/Uno.Themes.WinUI.Markup/Theme/PipsPager.cs @@ -0,0 +1,215 @@ +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Media; +using Uno.Extensions.Markup.Internals; +using Windows.Devices.Bluetooth.Advertisement; + +namespace Uno.Themes.Markup +{ + public static partial class Theme + { + public static class PipsPager + { + public static class Resources + { + public static class SelectionIndicator + { + public static class Foreground + { + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorForeground")] + public static ResourceValue Default => new("PipsPagerSelectionIndicatorForeground", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorForegroundPointerOver")] + public static ResourceValue PointerOver => new("PipsPagerSelectionIndicatorForegroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorForegroundPressed")] + public static ResourceValue Pressed => new("PipsPagerSelectionIndicatorForegroundPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorForegroundDisabled")] + public static ResourceValue Disabled => new("PipsPagerSelectionIndicatorForegroundDisabled", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorForegroundFocused")] + public static ResourceValue Focused => new("PipsPagerSelectionIndicatorForegroundFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorForegroundSelected")] + public static ResourceValue Selected => new("PipsPagerSelectionIndicatorForegroundSelected", true); + } + + public static class Background + { + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBackground")] + public static ResourceValue Default => new("PipsPagerSelectionIndicatorBackground", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBackgroundPointerOver")] + public static ResourceValue PointerOver => new("PipsPagerSelectionIndicatorBackgroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBackgroundPressed")] + public static ResourceValue Pressed => new("PipsPagerSelectionIndicatorBackgroundPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBackgroundSelected")] + public static ResourceValue Selected => new("PipsPagerSelectionIndicatorBackgroundSelected", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBackgroundDisabled")] + public static ResourceValue Disabled => new("PipsPagerSelectionIndicatorBackgroundDisabled", true); + } + + public static class BorderBrush + { + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBorderBrush")] + public static ResourceValue Default => new("PipsPagerSelectionIndicatorBorderBrush", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBorderBrushPointerOver")] + public static ResourceValue PointerOver => new("PipsPagerSelectionIndicatorBorderBrushPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBorderBrushPressed")] + public static ResourceValue Pressed => new("PipsPagerSelectionIndicatorBorderBrushPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBorderBrushSelected")] + public static ResourceValue Selected => new("PipsPagerSelectionIndicatorBorderBrushSelected", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerSelectionIndicatorBorderBrushDisabled")] + public static ResourceValue Disabled => new("PipsPagerSelectionIndicatorBorderBrushDisabled", true); + } + + public static class VisualStateEllipse + { + public static class Fill + { + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerVisualStateEllipseFill")] + public static ResourceValue Default => new("MaterialPipsPagerVisualStateEllipseFill", true); + + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerVisualStateEllipseFillPointerOver")] + public static ResourceValue PointerOver => new("MaterialPipsPagerVisualStateEllipseFillPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerVisualStateEllipseFillPressed")] + public static ResourceValue Pressed => new("MaterialPipsPagerVisualStateEllipseFillPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerVisualStateEllipseFillFocused")] + public static ResourceValue Focused => new("MaterialPipsPagerVisualStateEllipseFillFocused", true); + } + } + + [ResourceKeyDefinition(typeof(double), "PipsPagerHorizontalOrientationButtonWidth")] + public static ResourceValue HorizontalOrientationWidth => new("PipsPagerHorizontalOrientationButtonWidth", true); + + [ResourceKeyDefinition(typeof(double), "PipsPagerVerticalOrientationButtonWidth")] + public static ResourceValue VerticalOrientationWidth => new("PipsPagerVerticalOrientationButtonWidth", true); + + [ResourceKeyDefinition(typeof(double), "PipsPagerHorizontalOrientationButtonHeight")] + public static ResourceValue HorizontalOrientationHeight => new("PipsPagerHorizontalOrientationButtonHeight", true); + + [ResourceKeyDefinition(typeof(double), "PipsPagerVerticalOrientationButtonHeight")] + public static ResourceValue VerticalOrientationHeight => new("PipsPagerVerticalOrientationButtonHeight", true); + + [ResourceKeyDefinition(typeof(Thickness), "PipsPagerButtonBorderThickness")] + public static ResourceValue BorderThickness => new("PipsPagerButtonBorderThickness", true); + } + + [ResourceKeyDefinition(typeof(double), "PipsPagerNormalEllipseSize")] + public static ResourceValue NormalEllipseSize => new("PipsPagerNormalEllipseSize", true); + + [ResourceKeyDefinition(typeof(double), "PipsPagerSelectedEllipseSize")] + public static ResourceValue SelectedEllipseSize => new("PipsPagerSelectedEllipseSize", true); + + public static class NavigationButton + { + public static class Background + { + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonBackground")] + public static ResourceValue Default => new("PipsPagerNavigationButtonBackground", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonBackgroundPointerOver")] + public static ResourceValue PointerOver => new("PipsPagerNavigationButtonBackgroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonBackgroundPressed")] + public static ResourceValue Pressed => new("PipsPagerNavigationButtonBackgroundPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonBackgroundDisabled")] + public static ResourceValue Disabled => new("PipsPagerNavigationButtonBackgroundDisabled", true); + } + + public static class BorderBrush + { + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonBorderBrush")] + public static ResourceValue Default => new("PipsPagerNavigationButtonBorderBrush", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonBorderBrushPointerOver")] + public static ResourceValue PointerOver => new("PipsPagerNavigationButtonBorderBrushPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonBorderBrushPressed")] + public static ResourceValue Pressed => new("PipsPagerNavigationButtonBorderBrushPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonBorderBrushDisabled")] + public static ResourceValue Disabled => new("PipsPagerNavigationButtonBorderBrushDisabled", true); + } + + public static class Foreground + { + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonForeground")] + public static ResourceValue Default => new("PipsPagerNavigationButtonForeground", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonForegroundPointerOver")] + public static ResourceValue PointerOver => new("PipsPagerNavigationButtonForegroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonForegroundPressed")] + public static ResourceValue Pressed => new("PipsPagerNavigationButtonForegroundPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "PipsPagerNavigationButtonForegroundDisabled")] + public static ResourceValue Disabled => new("PipsPagerNavigationButtonForegroundDisabled", true); + } + + public static class VisualStateEllipse + { + + [ResourceKeyDefinition(typeof(double), "PipsPagerNavigationVisualStatesEllipseHeight")] + public static ResourceValue Height => new("PipsPagerNavigationVisualStatesEllipseHeight", true); + + + [ResourceKeyDefinition(typeof(double), "PipsPagerNavigationVisualStatesEllipseWidth")] + public static ResourceValue Width => new("PipsPagerNavigationVisualStatesEllipseWidth", true); + + public static class Fill + { + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerNavigationButtonVisualStateEllipseFill")] + public static ResourceValue Default => new("MaterialPipsPagerNavigationButtonVisualStateEllipseFill", true); + + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerNavigationButtonVisualStateEllipseFillPointerOver")] + public static ResourceValue PointerOver => new("MaterialPipsPagerNavigationButtonVisualStateEllipseFillPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerNavigationButtonVisualStateEllipseFillPressed")] + public static ResourceValue Pressed => new("MaterialPipsPagerNavigationButtonVisualStateEllipseFillPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerNavigationButtonVisualStateEllipseFillFocused")] + public static ResourceValue Focused => new("MaterialPipsPagerNavigationButtonVisualStateEllipseFillFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "MaterialPipsPagerNavigationButtonVisualStateEllipseFillUnfocused")] + public static ResourceValue Unfocused => new("MaterialPipsPagerNavigationButtonVisualStateEllipseFillUnfocused", true); + } + } + + [ResourceKeyDefinition(typeof(Geometry), "PipsPagerPreviousPageButtonData")] + public static ResourceValue PreviousPageData => new("PipsPagerPreviousPageButtonData", true); + + + [ResourceKeyDefinition(typeof(Geometry), "PipsPagerNextPageButtonData")] + public static ResourceValue NextPageData => new("PipsPagerNextPageButtonData", true); + + + [ResourceKeyDefinition(typeof(double), "PipsPagerNavigationButtonHeight")] + public static ResourceValue Height => new("PipsPagerNavigationButtonHeight", true); + + + [ResourceKeyDefinition(typeof(double), "PipsPagerNavigationButtonWidth")] + public static ResourceValue Width => new("PipsPagerNavigationButtonWidth", true); + + [ResourceKeyDefinition(typeof(Thickness), "PipsPagerNavigationButtonBorderThickness")] + public static ResourceValue BorderThickness => new("PipsPagerNavigationButtonBorderThickness", true); + + [ResourceKeyDefinition(typeof(Thickness), "PipsPagerNavigationButtonPadding")] + public static ResourceValue Padding => new("PipsPagerNavigationButtonPadding", true); + } + } + } + } +} + +