Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Application x:Class="WpfApp1.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:WpfApp1"
- StartupUri="MainWindow.xaml">
- <Application.Resources>
- <Style TargetType="{x:Type Button}">
- <Setter Property="Background" Value="#373737" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="FontSize" Value="10" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border CornerRadius="4" Background="{TemplateBinding Background}">
- <Grid>
- <Path x:Name="PathIcon" Width="15" Height="25" Stretch="Fill" Fill="#4C87B3" HorizontalAlignment="Left" Margin="17,0,0,0" Data="F1 M 30.0833,22.1667L 50.6665,37.6043L 50.6665,38.7918L 30.0833,53.8333L 30.0833,22.1667 Z "/>
- <ContentPresenter x:Name="MyContentPresenter" Content="{TemplateBinding Content}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,0,0,0" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" Value="#E59400" />
- <Setter Property="Foreground" Value="White" />
- <Setter TargetName="PathIcon" Property="Fill" Value="Black" />
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" Value="OrangeRed" />
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Application.Resources>
- </Application>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement