Created
August 16, 2017 17:06
-
-
Save mterwoord/ad36da9854701cb5adfb592db7a3eb83 to your computer and use it in GitHub Desktop.
Button sample
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
<Styles xmlns="https://github.com/avaloniaui" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:sys="clr-namespace:System;assembly=mscorlib"> | |
<Style Selector="Button.Round"> | |
<Setter Property="Template"> | |
<ControlTemplate> | |
<Border CornerRadius="8" Background="{TemplateBinding Background}"> | |
<ContentPresenter Content="{TemplateBinding Content}"/> | |
</Border> | |
</ControlTemplate> | |
</Setter> | |
</Style> | |
<Style Selector="Button.Round:pressed"> | |
<Setter Property="Template"> | |
<ControlTemplate> | |
<Border Background="Red" | |
CornerRadius="8"> | |
<ContentPresenter Content="{TemplateBinding Content}"/> | |
</Border> | |
</ControlTemplate> | |
</Setter> | |
</Style> | |
<Style Selector="Button.Round:pointerover"> | |
<Setter Property="Background" Value="Red"/> | |
</Style> | |
</Styles> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment