forked from TwoGuysCoding/MinutesWPF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAudioVisualizerControl.xaml
30 lines (30 loc) · 1.48 KB
/
AudioVisualizerControl.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
28
29
30
<UserControl
x:Class="Minutes.AudioVisualizerControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Minutes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="800"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<ItemsControl x:Name="AudioLevels" HorizontalAlignment="Center">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Rectangle
Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=BarWidth}"
Height="{Binding}"
Margin="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=BarMargin}"
Fill="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=BarColor}"
RadiusX="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=BarCornerRadius}"
RadiusY="{Binding RelativeSource={RelativeSource AncestorType=UserControl}, Path=BarCornerRadius}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
</ItemsControl>
</UserControl>