-
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 (#1055)
Co-authored-by: Ariel De Los Santos <[email protected]> Co-authored-by: Steve Bilogan <[email protected]>
- Loading branch information
1 parent
fcb79c3
commit a617639
Showing
2 changed files
with
94 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
94 changes: 94 additions & 0 deletions
94
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,94 @@ | ||
using Microsoft.UI.Xaml; | ||
using Microsoft.UI.Xaml.Media; | ||
using Uno.Extensions.Markup; | ||
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 Foreground | ||
{ | ||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonForeground")] | ||
public static ThemeResourceKey<Brush> Default => new("HyperlinkButtonForeground"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonForegroundPointerOver")] | ||
public static ThemeResourceKey<Brush> PointerOver => new("HyperlinkButtonForegroundPointerOver"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonForegroundPressed")] | ||
public static ThemeResourceKey<Brush> Pressed => new("HyperlinkButtonForegroundPressed"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonForegroundDisabled")] | ||
public static ThemeResourceKey<Brush> Disabled => new("HyperlinkButtonForegroundDisabled"); | ||
} | ||
|
||
public static class Background | ||
{ | ||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBackground")] | ||
public static ThemeResourceKey<Brush> Default => new("HyperlinkButtonBackground"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBackgroundPointerOver")] | ||
public static ThemeResourceKey<Brush> PointerOver => new("HyperlinkButtonBackgroundPointerOver"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBackgroundPressed")] | ||
public static ThemeResourceKey<Brush> Pressed => new("HyperlinkButtonBackgroundPressed"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBackgroundDisabled")] | ||
public static ThemeResourceKey<Brush> Disabled => new("HyperlinkButtonBackgroundDisabled"); | ||
} | ||
|
||
public static class BorderBrush | ||
{ | ||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBorderBrush")] | ||
public static ThemeResourceKey<Brush> Default => new("HyperlinkButtonBorderBrush"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBorderBrushPointerOver")] | ||
public static ThemeResourceKey<Brush> PointerOver => new("HyperlinkButtonBorderBrushPointerOver"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBorderBrushPressed")] | ||
public static ThemeResourceKey<Brush> Pressed => new("HyperlinkButtonBorderBrushPressed"); | ||
|
||
[ResourceKeyDefinition(typeof(Brush), "HyperlinkButtonBorderBrushDisabled")] | ||
public static ThemeResourceKey<Brush> Disabled => new("HyperlinkButtonBorderBrushDisabled"); | ||
} | ||
|
||
public static class Typography | ||
{ | ||
[ResourceKeyDefinition(typeof(FontFamily), "HyperlinkButtonFontFamily")] | ||
public static ThemeResourceKey<FontFamily> FontFamily => new("HyperlinkButtonFontFamily"); | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonFontSize")] | ||
public static ThemeResourceKey<double> FontSize => new("HyperlinkButtonFontSize"); | ||
} | ||
|
||
public static class Opacity | ||
{ | ||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonBackgroundOpacity")] | ||
public static ThemeResourceKey<double> Default => new("HyperlinkButtonBackgroundOpacity"); | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonBackgroundOpacityPointerOver")] | ||
public static ThemeResourceKey<double> PointerOver => new("HyperlinkButtonBackgroundOpacityPointerOver"); | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonBackgroundOpacityPressed")] | ||
public static ThemeResourceKey<double> Pressed => new("HyperlinkButtonBackgroundOpacityPressed"); | ||
|
||
[ResourceKeyDefinition(typeof(double), "HyperlinkButtonBackgroundOpacityDisabled")] | ||
public static ThemeResourceKey<double> Disabled => new("HyperlinkButtonBackgroundOpacityDisabled"); | ||
} | ||
} | ||
|
||
public static class Styles | ||
{ | ||
[ResourceKeyDefinition(typeof(Style), "HyperlinkButtonStyle", TargetType = typeof(HyperlinkButton))] | ||
public static StaticResourceKey<Style> Default => new("HyperlinkButtonStyle"); | ||
|
||
[ResourceKeyDefinition(typeof(Style), "SecondaryHyperlinkButtonStyle", TargetType = typeof(HyperlinkButton))] | ||
public static StaticResourceKey<Style> Secondary => new("SecondaryHyperlinkButtonStyle"); | ||
} | ||
} | ||
} | ||
} |