From 5e7ba4f42517249993d681acfc26abde860312b2 Mon Sep 17 00:00:00 2001 From: Ariel De Los Santos Date: Tue, 11 Jul 2023 11:58:17 -0400 Subject: [PATCH] feat: add lightweight styling to CSharpMarkup TextBox --- .../Themes.LightWeightStyles.TextBox.cs | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 src/library/Uno.Themes.WinUI.Markup/Theme.LightWeight/Themes.LightWeightStyles.TextBox.cs diff --git a/src/library/Uno.Themes.WinUI.Markup/Theme.LightWeight/Themes.LightWeightStyles.TextBox.cs b/src/library/Uno.Themes.WinUI.Markup/Theme.LightWeight/Themes.LightWeightStyles.TextBox.cs new file mode 100644 index 000000000..f648b1bde --- /dev/null +++ b/src/library/Uno.Themes.WinUI.Markup/Theme.LightWeight/Themes.LightWeightStyles.TextBox.cs @@ -0,0 +1,160 @@ +using Microsoft.UI.Xaml.Media; +using Uno.Extensions.Markup.Internals; + +namespace Uno.Themes.Markup +{ + public static partial class Theme + { + public static class TextBox + { + public static class Resources + { + public static class DeleteButton + { + public static class Foreground + { + [ResourceKeyDefinition(typeof(Brush), "TextBoxDeleteButtonForeground")] + public static ResourceValue Default => new("TextBoxDeleteButtonForeground", true); + + [ResourceKeyDefinition(typeof(Brush), "TextBoxDeleteButtonForegroundPointerOver")] + public static ResourceValue PointerOver => new("TextBoxDeleteButtonForegroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "TextBoxDeleteButtonForegroundPressed")] + public static ResourceValue Pressed => new("TextBoxDeleteButtonForegroundPressed", true); + + [ResourceKeyDefinition(typeof(Brush), "TextBoxDeleteButtonForegroundDisabled")] + public static ResourceValue Disabled => new("TextBoxDeleteButtonForegroundDisabled", true); + } + } + + public static class Filled + { + public static class Foreground + { + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxForeground")] + public static ResourceValue Default => new("FilledTextBoxForeground", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxForegroundPointerOver")] + public static ResourceValue PointerOver => new("FilledTextBoxForegroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxForegroundFocused")] + public static ResourceValue Focused => new("FilledTextBoxForegroundFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxForegroundDisabled")] + public static ResourceValue Disabled => new("FilledTextBoxForegroundDisabled", true); + } + + public static class PlaceholderForeground + { + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxPlaceholderForeground")] + public static ResourceValue Default => new("FilledTextBoxPlaceholderForeground", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxPlaceholderForegroundPointerOver")] + public static ResourceValue PointerOver => new("FilledTextBoxPlaceholderForegroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxPlaceholderForegroundFocused")] + public static ResourceValue Focused => new("FilledTextBoxPlaceholderForegroundFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxPlaceholderForegroundDisabled")] + public static ResourceValue Disabled => new("FilledTextBoxPlaceholderForegroundDisabled", true); + } + + + public static class DeleteButtonForeground + { + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxDeleteButtonForeground")] + public static ResourceValue Default => new("FilledTextBoxDeleteButtonForeground", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxDeleteButtonForegroundPointerOver")] + public static ResourceValue PointerOver => new("FilledTextBoxDeleteButtonForegroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxDeleteButtonForegroundFocused")] + public static ResourceValue Focused => new("FilledTextBoxDeleteButtonForegroundFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxDeleteButtonForegroundDisabled")] + public static ResourceValue Disabled => new("FilledTextBoxDeleteButtonForegroundDisabled", true); + } + + public static class Background + { + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxBackground")] + public static ResourceValue Default => new("FilledTextBoxBackground", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxBackgroundPointerOver")] + public static ResourceValue PointerOver => new("FilledTextBoxBackgroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxBackgroundFocused")] + public static ResourceValue Focused => new("FilledTextBoxBackgroundFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxBackgroundDisabled")] + public static ResourceValue Disabled => new("FilledTextBoxBackgroundDisabled", true); + + } + + public static class BorderBrush + { + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxBorderBrush")] + public static ResourceValue Default => new("FilledTextBoxBorderBrush", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxBorderBrushPointerOver")] + public static ResourceValue PointerOver => new("FilledTextBoxBorderBrushPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxBorderBrushFocused")] + public static ResourceValue Focused => new("FilledTextBoxBorderBrushFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "FilledTextBoxBorderBrushDisabled")] + public static ResourceValue Disabled => new("FilledTextBoxBorderBrushDisabled", true); + } + } + + public static class Outlined + { + public static class Foreground + { + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxForeground")] + public static ResourceValue Default => new("OutlinedTextBoxForeground", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxForegroundPointerOver")] + public static ResourceValue PointerOver => new("OutlinedTextBoxForegroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxForegroundFocused")] + public static ResourceValue Focused => new("OutlinedTextBoxForegroundFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxForegroundDisabled")] + public static ResourceValue Disabled => new("OutlinedTextBoxForegroundDisabled", true); + } + + public static class PlaceholderForeground + { + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxPlaceholderForeground")] + public static ResourceValue Default => new("OutlinedTextBoxPlaceholderForeground", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxPlaceholderForegroundPointerOver")] + public static ResourceValue PointerOver => new("OutlinedTextBoxPlaceholderForegroundPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxPlaceholderForegroundFocused")] + public static ResourceValue Focused => new("OutlinedTextBoxPlaceholderForegroundFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxPlaceholderForegroundDisabled")] + public static ResourceValue Disabled => new("OutlinedTextBoxPlaceholderForegroundDisabled", true); + } + + public static class BorderBrush + { + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxBorderBrush")] + public static ResourceValue Default => new("OutlinedTextBoxBorderBrush", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxBorderBrushPointerOver")] + public static ResourceValue PointerOver => new("OutlinedTextBoxBorderBrushPointerOver", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxBorderBrushFocused")] + public static ResourceValue Focused => new("OutlinedTextBoxBorderBrushFocused", true); + + [ResourceKeyDefinition(typeof(Brush), "OutlinedTextBoxBorderBrushDisabled")] + public static ResourceValue Disabled => new("OutlinedTextBoxBorderBrushDisabled", true); + } + } + } + } + } +}