<UserControl x:Class="WpfDisplay.Views.PaletteSwatch"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:WpfDisplay.ViewModels"
x:Name="swatch"
Cursor="Hand"
mc:Ignorable="d"
d:DesignWidth="150" d:DesignHeight="30"
d:DataContext="{d:DesignInstance Type=vm:ColorPaletteViewModel}">
<Border
BorderBrush="#252525"
BorderThickness="2"
CornerRadius="4">
<Border.CacheMode>
<BitmapCache RenderAtScale="1" EnableClearType="True"/>
</Border.CacheMode>
<Border.Style>
<Style TargetType="Border">
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, ElementName=swatch}" Value="True">
<Setter Property="BorderBrush" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>
<Border x:Name="BgBorder"
CornerRadius="3"
BorderThickness="0"
SnapsToDevicePixels="True">
<Border.Background>
<LinearGradientBrush x:Name="GradientBrush"/>
</Border.Background>
</Border>
</Border>
</UserControl>