-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(HyperlinkButton): lightweight styling for hyperlinkbutton
- Loading branch information
1 parent
d19569b
commit cee510a
Showing
2 changed files
with
96 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
src/library/Uno.Themes.WinUI.Markup/Theme/HyperlinkButton.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Media; | ||
using Uno.Extensions.Markup.Internals; | ||
|
||
namespace Uno.Themes.Markup | ||
{ | ||
public static partial class Theme | ||
{ | ||
public static class HyperlinkButton | ||
{ | ||
public static class Resources | ||
{ | ||
public static class Default | ||
{ | ||
public static class Foreground | ||
{ | ||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonForeground")] | ||
public static ResourceValue<Brush> Default => new("HyperlinkButtonForeground", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonForegroundPointerOver")] | ||
public static ResourceValue<Brush> PointerOver => new("HyperlinkButtonForegroundPointerOver", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonForegroundPressed")] | ||
public static ResourceValue<Brush> Pressed => new("HyperlinkButtonForegroundPressed", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonForegroundDisabled")] | ||
public static ResourceValue<Brush> Disabled => new("HyperlinkButtonForegroundDisabled", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "SecondaryHyperlinkButtonForeground")] | ||
public static ResourceValue<Brush> Secondary => new("SecondaryHyperlinkButtonForeground", true); | ||
} | ||
|
||
public static class Background | ||
{ | ||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBackground")] | ||
public static ResourceValue<Brush> Default => new("HyperlinkButtonBackground", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBackgroundPointerOver")] | ||
public static ResourceValue<Brush> PointerOver => new("HyperlinkButtonBackgroundPointerOver", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBackgroundPressed")] | ||
public static ResourceValue<Brush> Pressed => new("HyperlinkButtonBackgroundPressed", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBackgroundDisabled")] | ||
public static ResourceValue<Brush> Disabled => new("HyperlinkButtonBackgroundDisabled", true); | ||
} | ||
|
||
public static class BorderBrush | ||
{ | ||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBorderBrush")] | ||
public static ResourceValue<Brush> Default => new("HyperlinkButtonBorderBrush", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBorderBrushPointerOver")] | ||
public static ResourceValue<Brush> PointerOver => new("HyperlinkButtonBorderBrushPointerOver", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBorderBrushPressed")] | ||
public static ResourceValue<Brush> Pressed => new("HyperlinkButtonBorderBrushPressed", true); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBorderBrushDisabled")] | ||
public static ResourceValue<Brush> Disabled => new("HyperlinkButtonBorderBrushDisabled", true); | ||
} | ||
|
||
public static class Typo | ||
{ | ||
[ResourceKeyDefinition(typeof(FontFamily), "HyperlinkButtonFontFamily")] | ||
public static ResourceValue<FontFamily> FontFamily => new("HyperlinkButtonFontFamily", true); | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonFontSize")] | ||
public static ResourceValue<double> FontSize => new("HyperlinkButtonFontSize", true); | ||
} | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonBackgroundOpacity")] | ||
public static ResourceValue<double> Opacity => new("HyperlinkButtonBackgroundOpacity", true); | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonBackgroundOpacityPointerOver")] | ||
public static ResourceValue<double> OpacityPointerOver => new("HyperlinkButtonBackgroundOpacityPointerOver", true); | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonBackgroundOpacityPressed")] | ||
public static ResourceValue<double> OpacityPressed => new("HyperlinkButtonBackgroundOpacityPressed", true); | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonBackgroundOpacityDisabled")] | ||
public static ResourceValue<double> OpacityDisabled => new("HyperlinkButtonBackgroundOpacityDisabled", true); | ||
} | ||
} | ||
|
||
public static class Styles | ||
{ | ||
[ResourceKeyDefinition(typeof(Style), "HyperlinkButtonStyle", TargetType = typeof(HyperlinkButton))] | ||
public static ResourceValue<Style> Default => new("HyperlinkButtonStyle"); | ||
|
||
[ResourceKeyDefinition(typeof(Style), "SecondaryHyperlinkButtonStyle", TargetType = typeof(HyperlinkButton))] | ||
public static ResourceValue<Style> Secondary => new("SecondaryHyperlinkButtonStyle"); | ||
} | ||
} | ||
} | ||
} |