Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to change the border color of a flat button style
- <Style TargetType="Button" x:Key="FlatButtonStyle">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="Margin" Value="2" />
- <Setter Property="FontSize" Value="30" />
- <Style.Triggers>
- <Trigger Property="IsFocused" Value="true">
- <Setter Property="BorderBrush" Value="#E01919"/>
- </Trigger>
- </Style.Triggers>
- </Style>
- <UserControl.Resources>
- <Style x:Key="Flat">
- <Setter Property="Control.BorderBrush" Value="{x:Null}" />
- <Style.Triggers>
- <Trigger Property="Control.IsMouseOver" Value="True">
- <Setter Property="Control.BorderBrush" Value="{x:Null}" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </UserControl.Resources>
- <StackPanel>
- <Button Style="{StaticResource Flat}">Hello</Button>
- </StackPanel>
Add Comment
Please, Sign In to add comment