Skip to content

Commit

Permalink
Merge pull request #1192 from unoplatform/mergify/bp/release/stable/3…
Browse files Browse the repository at this point in the history
….0/pr-1190
  • Loading branch information
agneszitte authored Sep 1, 2023
2 parents ec35953 + 93fdc87 commit a955f47
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Binary file modified doc/assets/material-button-pointerover-lightweight-styling.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 11 additions & 2 deletions doc/lightweight-styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,22 @@ uid: uno.themes.lightweightstyling
All interactive controls have multiple states, such as **PointerOver** (mouse is hovered over), **Pressed** (control is pressed on), and **Disabled** (control is not interactable). These states are appended onto the endings of the resource keys: ButtonForeground*PointerOver*, ButtonForeground*Pressed*, and ButtonForeground*Disabled*. Combined with these, the CheckBox and RadioButton controls also have **Checked** and **Unchecked** states. [These links](lightweight-styling#resource-keys) list the resource keys for each control.

```xml
<Button Content="Overridden Button Style" Style="{StaticResource MaterialFilledButtonStyle}" BorderThickness="2">
<Button Content="Default Button Style"
Style="{StaticResource FilledButtonStyle}" />

<Button Content="Overridden Button Style"
Style="{StaticResource FilledButtonStyle}">
<Button.Resources>
<SolidColorBrush x:Key="FilledButtonForeground" Color="DarkGreen" />
<SolidColorBrush x:Key="FilledButtonBackground" Color="LightGreen" />
<SolidColorBrush x:Key="FilledButtonBorderBrush" Color="DarkGreen" />
</Button.Resources>
</Button>

<!-- Overriding the PointerOver brushes -->
<Button Content="Overridden Button Style (PointerOver)"
Style="{StaticResource FilledButtonStyle}">
<Button.Resources>
<Thickness x:Key="ButtonBorderThickness">2</Thickness>
<SolidColorBrush x:Key="FilledButtonForegroundPointerOver" Color="DarkRed" />
<SolidColorBrush x:Key="FilledButtonBackgroundPointerOver" Color="LightPink" />
<SolidColorBrush x:Key="FilledButtonBorderBrushPointerOver" Color="DarkRed" />
Expand Down

0 comments on commit a955f47

Please sign in to comment.