diff --git a/src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs b/src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs index a597ef2f5..3c077631e 100644 --- a/src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs +++ b/src/library/Uno.Themes.WinUI.Markup/Theme/Button.cs @@ -1,4 +1,7 @@ -using Microsoft.UI.Xaml; +using System; +using Windows.UI; +using Microsoft.UI.Text; +using Microsoft.UI.Xaml; using Microsoft.UI.Xaml.Media; using Uno.Extensions.Markup; using Uno.Extensions.Markup.Internals; @@ -7,525 +10,474 @@ namespace Uno.Themes.Markup { public static partial class Theme { - public static class Button + public static partial class Button { - public static class Resources + public static partial class Resources { - public static class Elevated + public static partial class Elevated { - public static class Foreground - { - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonForeground")] - public static ThemeResourceKey Default => new("ElevatedButtonForeground"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("ElevatedButtonForegroundPointerOver"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonForegroundPressed")] - public static ThemeResourceKey Pressed => new("ElevatedButtonForegroundPressed"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonForegroundFocused")] - public static ThemeResourceKey Focused => new("ElevatedButtonForegroundFocused"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("ElevatedButtonForegroundPointerFocused"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonForegroundDisabled")] - public static ThemeResourceKey Disabled => new("ElevatedButtonForegroundDisabled"); - } - - public static class IconForeground - { - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonIconForeground")] - public static ThemeResourceKey Default => new("ElevatedButtonIconForeground"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonIconForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("ElevatedButtonIconForegroundPointerOver"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonIconForegroundPressed")] - public static ThemeResourceKey Pressed => new("ElevatedButtonIconForegroundPressed"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonIconForegroundFocused")] - public static ThemeResourceKey Focused => new("ElevatedButtonIconForegroundFocused"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonIconForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("ElevatedButtonIconForegroundPointerFocused"); - - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonIconForegroundDisabled")] - public static ThemeResourceKey Disabled => new("ElevatedButtonIconForegroundDisabled"); - } - - public static class Background + public static readonly BackgroundVSG Background = new(); + public partial class BackgroundVSG { [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackground")] - public static ThemeResourceKey Default => new("ElevatedButtonBackground"); + public ThemeResourceKey Default = new("ElevatedButtonBackground"); [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackgroundPointerOver")] - public static ThemeResourceKey PointerOver => new("ElevatedButtonBackgroundPointerOver"); + public ThemeResourceKey PointerOver = new("ElevatedButtonBackgroundPointerOver"); [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackgroundPressed")] - public static ThemeResourceKey Pressed => new("ElevatedButtonBackgroundPressed"); + public ThemeResourceKey Pressed = new("ElevatedButtonBackgroundPressed"); + + [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackgroundDisabled")] + public ThemeResourceKey Disabled = new("ElevatedButtonBackgroundDisabled"); [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackgroundFocused")] - public static ThemeResourceKey Focused => new("ElevatedButtonBackgroundFocused"); + public ThemeResourceKey Focused = new("ElevatedButtonBackgroundFocused"); [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackgroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("ElevatedButtonBackgroundPointerFocused"); + public ThemeResourceKey PointerFocused = new("ElevatedButtonBackgroundPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBackgroundDisabled")] - public static ThemeResourceKey Disabled => new("ElevatedButtonBackgroundDisabled"); + public static implicit operator ThemeResourceKey(BackgroundVSG self) => self.Default; } - public static class BorderBrush + public static readonly BorderBrushVSG BorderBrush = new(); + public partial class BorderBrushVSG { [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrush")] - public static ThemeResourceKey Default => new("ElevatedButtonBorderBrush"); + public ThemeResourceKey Default = new("ElevatedButtonBorderBrush"); [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrushPointerOver")] - public static ThemeResourceKey PointerOver => new("ElevatedButtonBorderBrushPointerOver"); + public ThemeResourceKey PointerOver = new("ElevatedButtonBorderBrushPointerOver"); [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrushPressed")] - public static ThemeResourceKey Pressed => new("ElevatedButtonBorderBrushPressed"); + public ThemeResourceKey Pressed = new("ElevatedButtonBorderBrushPressed"); + + [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrushDisabled")] + public ThemeResourceKey Disabled = new("ElevatedButtonBorderBrushDisabled"); [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrushFocused")] - public static ThemeResourceKey Focused => new("ElevatedButtonBorderBrushFocused"); + public ThemeResourceKey Focused = new("ElevatedButtonBorderBrushFocused"); [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrushPointerFocused")] - public static ThemeResourceKey PointerFocused => new("ElevatedButtonBorderBrushPointerFocused"); + public ThemeResourceKey PointerFocused = new("ElevatedButtonBorderBrushPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonBorderBrushDisabled")] - public static ThemeResourceKey Disabled => new("ElevatedButtonBorderBrushDisabled"); + public static implicit operator ThemeResourceKey(BorderBrushVSG self) => self.Default; } - } - public static class Filled - { - public static class Foreground + public static readonly ElevationVSG Elevation = new(); + public partial class ElevationVSG { - [ResourceKeyDefinition(typeof(Brush), "FilledButtonForeground")] - public static ThemeResourceKey Default => new("FilledButtonForeground"); + [ResourceKeyDefinition(typeof(double), "ElevatedButtonElevation")] + public ThemeResourceKey Default = new("ElevatedButtonElevation"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("FilledButtonForegroundPointerOver"); + [ResourceKeyDefinition(typeof(double), "ElevatedButtonElevationDisabled")] + public ThemeResourceKey Disabled = new("ElevatedButtonElevationDisabled"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonForegroundPressed")] - public static ThemeResourceKey Pressed => new("FilledButtonForegroundPressed"); + public static implicit operator ThemeResourceKey(ElevationVSG self) => self.Default; + } - [ResourceKeyDefinition(typeof(Brush), "FilledButtonForegroundFocused")] - public static ThemeResourceKey Focused => new("FilledButtonForegroundFocused"); + public static readonly MarginVSG Margin = new(); + public partial class MarginVSG + { + [ResourceKeyDefinition(typeof(Thickness), "ElevatedButtonMargin")] + public ThemeResourceKey Default = new("ElevatedButtonMargin"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("FilledButtonForegroundPointerFocused"); + [ResourceKeyDefinition(typeof(Thickness), "ElevatedButtonDisabledMargin")] + public ThemeResourceKey Disabled = new("ElevatedButtonDisabledMargin"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonForegroundDisabled")] - public static ThemeResourceKey Disabled => new("FilledButtonForegroundDisabled"); + public static implicit operator ThemeResourceKey(MarginVSG self) => self.Default; } - public static class IconForeground + public static partial class StateLayerBackground { - [ResourceKeyDefinition(typeof(Brush), "FilledButtonIconForeground")] - public static ThemeResourceKey Default => new("FilledButtonIconForeground"); + [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonStateLayerBackgroundPointerOver")] + public static ThemeResourceKey PointerOver => new("ElevatedButtonStateLayerBackgroundPointerOver"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonIconForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("FilledButtonIconForegroundPointerOver"); + [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonStateLayerBackgroundPressed")] + public static ThemeResourceKey Pressed => new("ElevatedButtonStateLayerBackgroundPressed"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonIconForegroundPressed")] - public static ThemeResourceKey Pressed => new("FilledButtonIconForegroundPressed"); + [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonStateLayerBackgroundFocused")] + public static ThemeResourceKey Focused => new("ElevatedButtonStateLayerBackgroundFocused"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonIconForegroundFocused")] - public static ThemeResourceKey Focused => new("FilledButtonIconForegroundFocused"); + [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonStateLayerBackgroundPointerFocused")] + public static ThemeResourceKey PointerFocused => new("ElevatedButtonStateLayerBackgroundPointerFocused"); + } - [ResourceKeyDefinition(typeof(Brush), "FilledButtonIconForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("FilledButtonIconForegroundPointerFocused"); + [ResourceKeyDefinition(typeof(Brush), "ElevatedButtonForeground")] + public static ThemeResourceKey Foreground => new("ElevatedButtonForeground"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonIconForegroundDisabled")] - public static ThemeResourceKey Disabled => new("FilledButtonIconForegroundDisabled"); - } + [ResourceKeyDefinition(typeof(bool), "ElevatedButtonIsTintEnabled")] + public static StaticResourceKey IsTintEnabled => new("ElevatedButtonIsTintEnabled"); + } - public static class Background + public static partial class Filled + { + public static readonly BackgroundVSG Background = new(); + public partial class BackgroundVSG { [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackground")] - public static ThemeResourceKey Default => new("FilledButtonBackground"); + public ThemeResourceKey Default = new("FilledButtonBackground"); [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackgroundPointerOver")] - public static ThemeResourceKey PointerOver => new("FilledButtonBackgroundPointerOver"); + public ThemeResourceKey PointerOver = new("FilledButtonBackgroundPointerOver"); [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackgroundPressed")] - public static ThemeResourceKey Pressed => new("FilledButtonBackgroundPressed"); + public ThemeResourceKey Pressed = new("FilledButtonBackgroundPressed"); + + [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackgroundDisabled")] + public ThemeResourceKey Disabled = new("FilledButtonBackgroundDisabled"); [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackgroundFocused")] - public static ThemeResourceKey Focused => new("FilledButtonBackgroundFocused"); + public ThemeResourceKey Focused = new("FilledButtonBackgroundFocused"); [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackgroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("FilledButtonBackgroundPointerFocused"); + public ThemeResourceKey PointerFocused = new("FilledButtonBackgroundPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonBackgroundDisabled")] - public static ThemeResourceKey Disabled => new("FilledButtonBackgroundDisabled"); + public static implicit operator ThemeResourceKey(BackgroundVSG self) => self.Default; } - public static class BorderBrush + public static readonly BorderBrushVSG BorderBrush = new(); + public partial class BorderBrushVSG { [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrush")] - public static ThemeResourceKey Default => new("FilledButtonBorderBrush"); + public ThemeResourceKey Default = new("FilledButtonBorderBrush"); [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrushPointerOver")] - public static ThemeResourceKey PointerOver => new("FilledButtonBorderBrushPointerOver"); + public ThemeResourceKey PointerOver = new("FilledButtonBorderBrushPointerOver"); [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrushPressed")] - public static ThemeResourceKey Pressed => new("FilledButtonBorderBrushPressed"); + public ThemeResourceKey Pressed = new("FilledButtonBorderBrushPressed"); + + [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrushDisabled")] + public ThemeResourceKey Disabled = new("FilledButtonBorderBrushDisabled"); [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrushFocused")] - public static ThemeResourceKey Focused => new("FilledButtonBorderBrushFocused"); + public ThemeResourceKey Focused = new("FilledButtonBorderBrushFocused"); [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrushPointerFocused")] - public static ThemeResourceKey PointerFocused => new("FilledButtonBorderBrushPointerFocused"); + public ThemeResourceKey PointerFocused = new("FilledButtonBorderBrushPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "FilledButtonBorderBrushDisabled")] - public static ThemeResourceKey Disabled => new("FilledButtonBorderBrushDisabled"); + public static implicit operator ThemeResourceKey(BorderBrushVSG self) => self.Default; } - } - public static class FilledTonal - { - public static class Foreground + public static partial class StateLayerBackground { - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonForeground")] - public static ThemeResourceKey Default => new("FilledTonalButtonForeground"); + [ResourceKeyDefinition(typeof(Brush), "FilledButtonStateLayerBackgroundPointerOver")] + public static ThemeResourceKey PointerOver => new("FilledButtonStateLayerBackgroundPointerOver"); - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("FilledTonalButtonForegroundPointerOver"); + [ResourceKeyDefinition(typeof(Brush), "FilledButtonStateLayerBackgroundPressed")] + public static ThemeResourceKey Pressed => new("FilledButtonStateLayerBackgroundPressed"); - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonForegroundPressed")] - public static ThemeResourceKey Pressed => new("FilledTonalButtonForegroundPressed"); + [ResourceKeyDefinition(typeof(Brush), "FilledButtonStateLayerBackgroundFocused")] + public static ThemeResourceKey Focused => new("FilledButtonStateLayerBackgroundFocused"); - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonForegroundFocused")] - public static ThemeResourceKey Focused => new("FilledTonalButtonForegroundFocused"); - - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("FilledTonalButtonForegroundPointerFocused"); - - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonForegroundDisabled")] - public static ThemeResourceKey Disabled => new("FilledTonalButtonForegroundDisabled"); + [ResourceKeyDefinition(typeof(Brush), "FilledButtonStateLayerBackgroundPointerFocused")] + public static ThemeResourceKey PointerFocused => new("FilledButtonStateLayerBackgroundPointerFocused"); } - public static class IconForeground - { - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonIconForeground")] - public static ThemeResourceKey Default => new("FilledTonalButtonIconForeground"); - - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonIconForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("FilledTonalButtonIconForegroundPointerOver"); - - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonIconForegroundPressed")] - public static ThemeResourceKey Pressed => new("FilledTonalButtonIconForegroundPressed"); - - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonIconForegroundFocused")] - public static ThemeResourceKey Focused => new("FilledTonalButtonIconForegroundFocused"); + [ResourceKeyDefinition(typeof(double), "ButtonElevation")] + public static ThemeResourceKey Elevation => new("ButtonElevation"); - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonIconForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("FilledTonalButtonIconForegroundPointerFocused"); + [ResourceKeyDefinition(typeof(Brush), "FilledButtonForeground")] + public static ThemeResourceKey Foreground => new("FilledButtonForeground"); - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonIconForegroundDisabled")] - public static ThemeResourceKey Disabled => new("FilledTonalButtonIconForegroundDisabled"); - } + [ResourceKeyDefinition(typeof(Thickness), "ButtonMargin")] + public static ThemeResourceKey Margin => new("ButtonMargin"); + } - public static class Background + public static partial class FilledTonal + { + public static readonly BackgroundVSG Background = new(); + public partial class BackgroundVSG { [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackground")] - public static ThemeResourceKey Default => new("FilledTonalButtonBackground"); + public ThemeResourceKey Default = new("FilledTonalButtonBackground"); [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackgroundPointerOver")] - public static ThemeResourceKey PointerOver => new("FilledTonalButtonBackgroundPointerOver"); + public ThemeResourceKey PointerOver = new("FilledTonalButtonBackgroundPointerOver"); [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackgroundPressed")] - public static ThemeResourceKey Pressed => new("FilledTonalButtonBackgroundPressed"); + public ThemeResourceKey Pressed = new("FilledTonalButtonBackgroundPressed"); + + [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackgroundDisabled")] + public ThemeResourceKey Disabled = new("FilledTonalButtonBackgroundDisabled"); [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackgroundFocused")] - public static ThemeResourceKey Focused => new("FilledTonalButtonBackgroundFocused"); + public ThemeResourceKey Focused = new("FilledTonalButtonBackgroundFocused"); [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackgroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("FilledTonalButtonBackgroundPointerFocused"); + public ThemeResourceKey PointerFocused = new("FilledTonalButtonBackgroundPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBackgroundDisabled")] - public static ThemeResourceKey Disabled => new("FilledTonalButtonBackgroundDisabled"); + public static implicit operator ThemeResourceKey(BackgroundVSG self) => self.Default; } - public static class BorderBrush + public static readonly BorderBrushVSG BorderBrush = new(); + public partial class BorderBrushVSG { [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrush")] - public static ThemeResourceKey Default => new("FilledTonalButtonBorderBrush"); + public ThemeResourceKey Default = new("FilledTonalButtonBorderBrush"); [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrushPointerOver")] - public static ThemeResourceKey PointerOver => new("FilledTonalButtonBorderBrushPointerOver"); + public ThemeResourceKey PointerOver = new("FilledTonalButtonBorderBrushPointerOver"); [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrushPressed")] - public static ThemeResourceKey Pressed => new("FilledTonalButtonBorderBrushPressed"); + public ThemeResourceKey Pressed = new("FilledTonalButtonBorderBrushPressed"); + + [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrushDisabled")] + public ThemeResourceKey Disabled = new("FilledTonalButtonBorderBrushDisabled"); [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrushFocused")] - public static ThemeResourceKey Focused => new("FilledTonalButtonBorderBrushFocused"); + public ThemeResourceKey Focused = new("FilledTonalButtonBorderBrushFocused"); [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrushPointerFocused")] - public static ThemeResourceKey PointerFocused => new("FilledTonalButtonBorderBrushPointerFocused"); + public ThemeResourceKey PointerFocused = new("FilledTonalButtonBorderBrushPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonBorderBrushDisabled")] - public static ThemeResourceKey Disabled => new("FilledTonalButtonBorderBrushDisabled"); + public static implicit operator ThemeResourceKey(BorderBrushVSG self) => self.Default; } - } - public static class Outlined - { - public static class Foreground + public static partial class StateLayerBackground { - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonForeground")] - public static ThemeResourceKey Default => new("OutlinedButtonForeground"); + [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonStateLayerBackgroundPointerOver")] + public static ThemeResourceKey PointerOver => new("FilledTonalButtonStateLayerBackgroundPointerOver"); + + [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonStateLayerBackgroundPressed")] + public static ThemeResourceKey Pressed => new("FilledTonalButtonStateLayerBackgroundPressed"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("OutlinedButtonForegroundPointerOver"); + [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonStateLayerBackgroundFocused")] + public static ThemeResourceKey Focused => new("FilledTonalButtonStateLayerBackgroundFocused"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonForegroundPressed")] - public static ThemeResourceKey Pressed => new("OutlinedButtonForegroundPressed"); + [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonStateLayerBackgroundPointerFocused")] + public static ThemeResourceKey PointerFocused => new("FilledTonalButtonStateLayerBackgroundPointerFocused"); + } - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonForegroundFocused")] - public static ThemeResourceKey Focused => new("OutlinedButtonForegroundFocused"); + [ResourceKeyDefinition(typeof(double), "ButtonElevation")] + public static ThemeResourceKey Elevation => new("ButtonElevation"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("OutlinedButtonForegroundPointerFocused"); + [ResourceKeyDefinition(typeof(Brush), "FilledTonalButtonForeground")] + public static ThemeResourceKey Foreground => new("FilledTonalButtonForeground"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonForegroundDisabled")] - public static ThemeResourceKey Disabled => new("OutlinedButtonForegroundDisabled"); + [ResourceKeyDefinition(typeof(Thickness), "ButtonMargin")] + public static ThemeResourceKey Margin => new("ButtonMargin"); + } + + public static partial class Icon + { + public static partial class Ellipse + { + [ResourceKeyDefinition(typeof(string), "IconButtonEllipseHorizontalAlignment")] + public static StaticResourceKey HorizontalAlignment => new("IconButtonEllipseHorizontalAlignment"); + + [ResourceKeyDefinition(typeof(string), "IconButtonEllipseVerticalAlignment")] + public static StaticResourceKey VerticalAlignment => new("IconButtonEllipseVerticalAlignment"); } - public static class IconForeground + public static readonly OpacityHiddenStateVSG OpacityHiddenState = new(); + public partial class OpacityHiddenStateVSG { - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonIconForeground")] - public static ThemeResourceKey Default => new("OutlinedButtonIconForeground"); + [ResourceKeyDefinition(typeof(double), "IconButtonOpacityHiddenState")] + public ThemeResourceKey Default = new("IconButtonOpacityHiddenState"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonIconForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("OutlinedButtonIconForegroundPointerOver"); + [ResourceKeyDefinition(typeof(double), "IconButtonOpacityVisibleState")] + public ThemeResourceKey PointerOver = new("IconButtonOpacityVisibleState"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonIconForegroundPressed")] - public static ThemeResourceKey Pressed => new("OutlinedButtonIconForegroundPressed"); + public static implicit operator ThemeResourceKey(OpacityHiddenStateVSG self) => self.Default; + } - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonIconForegroundFocused")] - public static ThemeResourceKey Focused => new("OutlinedButtonIconForegroundFocused"); + [ResourceKeyDefinition(typeof(Brush), "IconButtonEllipseFillFocused")] + public static ThemeResourceKey EllipseFillFocused => new("IconButtonEllipseFillFocused"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonIconForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("OutlinedButtonIconForegroundPointerFocused"); + [ResourceKeyDefinition(typeof(Brush), "IconButtonEllipseFillPointerOver")] + public static ThemeResourceKey EllipseFillPointerOver => new("IconButtonEllipseFillPointerOver"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonIconForegroundDisabled")] - public static ThemeResourceKey Disabled => new("OutlinedButtonIconForegroundDisabled"); - } + [ResourceKeyDefinition(typeof(Brush), "IconButtonEllipseFillPressed")] + public static ThemeResourceKey EllipseFillPressed => new("IconButtonEllipseFillPressed"); + + [ResourceKeyDefinition(typeof(Brush), "IconButtonForeground")] + public static ThemeResourceKey Foreground => new("IconButtonForeground"); + + [ResourceKeyDefinition(typeof(Brush), "IconButtonForegroundDisabled")] + public static ThemeResourceKey ForegroundDisabled => new("IconButtonForegroundDisabled"); + } - public static class Background + public static partial class Outlined + { + public static readonly BackgroundVSG Background = new(); + public partial class BackgroundVSG { [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackground")] - public static ThemeResourceKey Default => new("OutlinedButtonBackground"); + public ThemeResourceKey Default = new("OutlinedButtonBackground"); [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackgroundPointerOver")] - public static ThemeResourceKey PointerOver => new("OutlinedButtonBackgroundPointerOver"); + public ThemeResourceKey PointerOver = new("OutlinedButtonBackgroundPointerOver"); [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackgroundPressed")] - public static ThemeResourceKey Pressed => new("OutlinedButtonBackgroundPressed"); + public ThemeResourceKey Pressed = new("OutlinedButtonBackgroundPressed"); [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackgroundFocused")] - public static ThemeResourceKey Focused => new("OutlinedButtonBackgroundFocused"); + public ThemeResourceKey Focused = new("OutlinedButtonBackgroundFocused"); [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackgroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("OutlinedButtonBackgroundPointerFocused"); + public ThemeResourceKey PointerFocused = new("OutlinedButtonBackgroundPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackgroundDisabled")] - public static ThemeResourceKey Disabled => new("OutlinedButtonBackgroundDisabled"); + public static implicit operator ThemeResourceKey(BackgroundVSG self) => self.Default; } - public static class BorderBrush + public static readonly BorderBrushVSG BorderBrush = new(); + public partial class BorderBrushVSG { [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBorderBrush")] - public static ThemeResourceKey Default => new("OutlinedButtonBorderBrush"); + public ThemeResourceKey Default = new("OutlinedButtonBorderBrush"); [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBorderBrushPointerOver")] - public static ThemeResourceKey PointerOver => new("OutlinedButtonBorderBrushPointerOver"); + public ThemeResourceKey PointerOver = new("OutlinedButtonBorderBrushPointerOver"); [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBorderBrushPressed")] - public static ThemeResourceKey Pressed => new("OutlinedButtonBorderBrushPressed"); + public ThemeResourceKey Pressed = new("OutlinedButtonBorderBrushPressed"); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBackgroundDisabled")] + public ThemeResourceKey Disabled = new("OutlinedButtonBackgroundDisabled"); [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBorderBrushFocused")] - public static ThemeResourceKey Focused => new("OutlinedButtonBorderBrushFocused"); + public ThemeResourceKey Focused = new("OutlinedButtonBorderBrushFocused"); [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBorderBrushPointerFocused")] - public static ThemeResourceKey PointerFocused => new("OutlinedButtonBorderBrushPointerFocused"); + public ThemeResourceKey PointerFocused = new("OutlinedButtonBorderBrushPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonBorderBrushDisabled")] - public static ThemeResourceKey Disabled => new("OutlinedButtonBorderBrushDisabled"); + public static implicit operator ThemeResourceKey(BorderBrushVSG self) => self.Default; } - } - public static class Text - { - public static class Foreground + public static partial class StateLayerBackground { - [ResourceKeyDefinition(typeof(Brush), "TextButtonForeground")] - public static ThemeResourceKey Default => new("TextButtonForeground"); - - [ResourceKeyDefinition(typeof(Brush), "TextButtonForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("TextButtonForegroundPointerOver"); - - [ResourceKeyDefinition(typeof(Brush), "TextButtonForegroundPressed")] - public static ThemeResourceKey Pressed => new("TextButtonForegroundPressed"); + [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonStateLayerBackgroundPointerOver")] + public static ThemeResourceKey PointerOver => new("OutlinedButtonStateLayerBackgroundPointerOver"); - [ResourceKeyDefinition(typeof(Brush), "TextButtonForegroundFocused")] - public static ThemeResourceKey Focused => new("TextButtonForegroundFocused"); + [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonStateLayerBackgroundPressed")] + public static ThemeResourceKey Pressed => new("OutlinedButtonStateLayerBackgroundPressed"); - [ResourceKeyDefinition(typeof(Brush), "TextButtonForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("TextButtonForegroundPointerFocused"); + [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonStateLayerBackgroundFocused")] + public static ThemeResourceKey Focused => new("OutlinedButtonStateLayerBackgroundFocused"); - [ResourceKeyDefinition(typeof(Brush), "TextButtonForegroundDisabled")] - public static ThemeResourceKey Disabled => new("TextButtonForegroundDisabled"); + [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonStateLayerBackgroundPointerFocused")] + public static ThemeResourceKey PointerFocused => new("OutlinedButtonStateLayerBackgroundPointerFocused"); } - public static class IconForeground - { - [ResourceKeyDefinition(typeof(Brush), "TextButtonIconForeground")] - public static ThemeResourceKey Default => new("TextButtonIconForeground"); - - [ResourceKeyDefinition(typeof(Brush), "TextButtonIconForegroundPointerOver")] - public static ThemeResourceKey PointerOver => new("TextButtonIconForegroundPointerOver"); - - [ResourceKeyDefinition(typeof(Brush), "TextButtonIconForegroundPressed")] - public static ThemeResourceKey Pressed => new("TextButtonIconForegroundPressed"); - - [ResourceKeyDefinition(typeof(Brush), "TextButtonIconForegroundFocused")] - public static ThemeResourceKey Focused => new("TextButtonIconForegroundFocused"); + [ResourceKeyDefinition(typeof(Thickness), "OutlinedButtonBorderThickness")] + public static ThemeResourceKey BorderThickness => new("OutlinedButtonBorderThickness"); - [ResourceKeyDefinition(typeof(Brush), "TextButtonIconForegroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("TextButtonIconForegroundPointerFocused"); - - [ResourceKeyDefinition(typeof(Brush), "TextButtonIconForegroundDisabled")] - public static ThemeResourceKey Disabled => new("TextButtonIconForegroundDisabled"); - } + [ResourceKeyDefinition(typeof(Brush), "OutlinedButtonForeground")] + public static ThemeResourceKey Foreground => new("OutlinedButtonForeground"); + } - public static class Background + public static partial class Text + { + public static readonly BackgroundVSG Background = new(); + public partial class BackgroundVSG { [ResourceKeyDefinition(typeof(Brush), "TextButtonBackground")] - public static ThemeResourceKey Default => new("TextButtonBackground"); + public ThemeResourceKey Default = new("TextButtonBackground"); [ResourceKeyDefinition(typeof(Brush), "TextButtonBackgroundPointerOver")] - public static ThemeResourceKey PointerOver => new("TextButtonBackgroundPointerOver"); + public ThemeResourceKey PointerOver = new("TextButtonBackgroundPointerOver"); [ResourceKeyDefinition(typeof(Brush), "TextButtonBackgroundPressed")] - public static ThemeResourceKey Pressed => new("TextButtonBackgroundPressed"); + public ThemeResourceKey Pressed = new("TextButtonBackgroundPressed"); [ResourceKeyDefinition(typeof(Brush), "TextButtonBackgroundFocused")] - public static ThemeResourceKey Focused => new("TextButtonBackgroundFocused"); + public ThemeResourceKey Focused = new("TextButtonBackgroundFocused"); [ResourceKeyDefinition(typeof(Brush), "TextButtonBackgroundPointerFocused")] - public static ThemeResourceKey PointerFocused => new("TextButtonBackgroundPointerFocused"); + public ThemeResourceKey PointerFocused = new("TextButtonBackgroundPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "TextButtonBackgroundDisabled")] - public static ThemeResourceKey Disabled => new("TextButtonBackgroundDisabled"); + public static implicit operator ThemeResourceKey(BackgroundVSG self) => self.Default; } - public static class BorderBrush + public static readonly BorderBrushVSG BorderBrush = new(); + public partial class BorderBrushVSG { [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrush")] - public static ThemeResourceKey Default => new("TextButtonBorderBrush"); + public ThemeResourceKey Default = new("TextButtonBorderBrush"); [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrushPointerOver")] - public static ThemeResourceKey PointerOver => new("TextButtonBorderBrushPointerOver"); + public ThemeResourceKey PointerOver = new("TextButtonBorderBrushPointerOver"); [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrushPressed")] - public static ThemeResourceKey Pressed => new("TextButtonBorderBrushPressed"); + public ThemeResourceKey Pressed = new("TextButtonBorderBrushPressed"); + + [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrushDisabled")] + public ThemeResourceKey Disabled = new("TextButtonBorderBrushDisabled"); [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrushFocused")] - public static ThemeResourceKey Focused => new("TextButtonBorderBrushFocused"); + public ThemeResourceKey Focused = new("TextButtonBorderBrushFocused"); [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrushPointerFocused")] - public static ThemeResourceKey PointerFocused => new("TextButtonBorderBrushPointerFocused"); + public ThemeResourceKey PointerFocused = new("TextButtonBorderBrushPointerFocused"); - [ResourceKeyDefinition(typeof(Brush), "TextButtonBorderBrushDisabled")] - public static ThemeResourceKey Disabled => new("TextButtonBorderBrushDisabled"); + public static implicit operator ThemeResourceKey(BorderBrushVSG self) => self.Default; } - } - public static class Icon - { - public static class Foreground + public static partial class StateLayerBackground { - [ResourceKeyDefinition(typeof(Brush), "IconButtonForeground")] - public static ThemeResourceKey Default => new("IconButtonForeground"); + [ResourceKeyDefinition(typeof(Brush), "TextButtonStateLayerBackgroundPointerOver")] + public static ThemeResourceKey PointerOver => new("TextButtonStateLayerBackgroundPointerOver"); - [ResourceKeyDefinition(typeof(Brush), "IconButtonForegroundDisabled")] - public static ThemeResourceKey Disabled => new("IconButtonForegroundDisabled"); - } - - public static class EllipseFill - { - [ResourceKeyDefinition(typeof(Brush), "IconButtonEllipseFillPointerOver")] - public static ThemeResourceKey PointerOver => new("IconButtonEllipseFillPointerOver"); + [ResourceKeyDefinition(typeof(Brush), "TextButtonStateLayerBackgroundPressed")] + public static ThemeResourceKey Pressed => new("TextButtonStateLayerBackgroundPressed"); - [ResourceKeyDefinition(typeof(Brush), "IconButtonEllipseFillPressed")] - public static ThemeResourceKey Pressed => new("IconButtonEllipseFillPressed"); + [ResourceKeyDefinition(typeof(Brush), "TextButtonStateLayerBackgroundFocused")] + public static ThemeResourceKey Focused => new("TextButtonStateLayerBackgroundFocused"); - [ResourceKeyDefinition(typeof(Brush), "IconButtonEllipseFillFocused")] - public static ThemeResourceKey Focused => new("IconButtonEllipseFillFocused"); + [ResourceKeyDefinition(typeof(Brush), "TextButtonStateLayerBackgroundPointerFocused")] + public static ThemeResourceKey PointerFocused => new("TextButtonStateLayerBackgroundPointerFocused"); } - } - } - - public static class Styles - { - [ResourceKeyDefinition(typeof(Style), "ElevatedButtonStyle", TargetType = typeof(Button))] - public static StaticResourceKey