forked from filoe/cscore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWaveform.xaml
27 lines (27 loc) · 1.34 KB
/
Waveform.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<UserControl x:Class="CSCoreWaveform.Waveform"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
>
<Grid>
<Canvas x:Name="PART_Canvas" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
MouseLeftButtonDown="PART_Canvas_OnMouseLeftButtonDown">
<Path Name="PART_Path">
<Path.Style>
<Style TargetType="Path">
<Setter Property="Fill" Value="Green"/>
<Setter Property="Stroke" Value="Transparent"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Canvas}}}" Value="True">
<Setter Property="Fill" Value="DarkGreen"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Path.Style>
</Path>
</Canvas>
</Grid>
</UserControl>