|
|
|
@ -1,4 +1,5 @@ |
|
|
|
<UserControl xmlns="https://github.com/perspex"> |
|
|
|
<UserControl xmlns="https://github.com/perspex" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> |
|
|
|
<StackPanel Orientation="Vertical" Gap="4"> |
|
|
|
<TextBlock Classes="h1">Button</TextBlock> |
|
|
|
<TextBlock Classes="h2">A button control</TextBlock> |
|
|
|
@ -9,18 +10,27 @@ |
|
|
|
Gap="16"> |
|
|
|
<StackPanel Orientation="Vertical" Gap="8" Width="150"> |
|
|
|
<Button>Button</Button> |
|
|
|
<Button Foreground="Blue">Foreground</Button> |
|
|
|
<Button Background="#f44336">Background</Button> |
|
|
|
<Button Foreground="White">Foreground</Button> |
|
|
|
<Button Background="{StyleResource ThemeAccentBrush}">Background</Button> |
|
|
|
<Button IsEnabled="False">Disabled</Button> |
|
|
|
<Button Content="Re-themed"> |
|
|
|
<Button.Styles> |
|
|
|
<Style> |
|
|
|
<Style.Resources> |
|
|
|
<SolidColorBrush x:Key="ThemeBorderMidBrush">Red</SolidColorBrush> |
|
|
|
<SolidColorBrush x:Key="ThemeControlDarkBrush">DarkRed</SolidColorBrush> |
|
|
|
</Style.Resources> |
|
|
|
</Style> |
|
|
|
</Button.Styles> |
|
|
|
</Button> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
<StackPanel Orientation="Vertical" Gap="8" Width="150"> |
|
|
|
<Button BorderThickness="0">No Border</Button> |
|
|
|
<Button BorderBrush="#f44336">Border Color</Button> |
|
|
|
<Button BorderBrush="#f44336" BorderThickness="4">Thick Border</Button> |
|
|
|
<Button BorderBrush="#f44336" BorderThickness="4" IsEnabled="False">Disabled</Button> |
|
|
|
<Button BorderBrush="{StyleResource ThemeAccentBrush}">Border Color</Button> |
|
|
|
<Button BorderBrush="{StyleResource ThemeAccentBrush}" BorderThickness="4">Thick Border</Button> |
|
|
|
<Button BorderBrush="{StyleResource ThemeAccentBrush}" BorderThickness="4" IsEnabled="False">Disabled</Button> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
|
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</UserControl> |