<UserControl x:Class="WpfDisplay.Views.GradientBarControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="gradientBar"
Cursor="Hand">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Gradient bar with draggable keys -->
<Border Grid.Row="0"
x:Name="BarBorder"
Height="48"
CornerRadius="4"
BorderBrush="#40000000"
BorderThickness="1"
SnapsToDevicePixels="True"
MouseDown="Bar_MouseDown"
MouseMove="Bar_MouseMove"
MouseUp="Bar_MouseUp">
<Border.Background>
<LinearGradientBrush x:Name="GradientBrush"/>
</Border.Background>
<!-- Key handles rendered on top -->
<Canvas x:Name="KeysCanvas"
IsHitTestVisible="False"/>
</Border>
<!-- Position ruler -->
<Border Grid.Row="1"
Height="16"
Margin="0,2,0,0"
Background="Transparent">
<Canvas x:Name="RulerCanvas"/>
</Border>
</Grid>
</UserControl>