Digital Peak Level Meter – XAML Markup

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:i4="clr-namespace:VolumeIndicatorControl;assembly=VolumeIndicatorControl">

    <SolidColorBrush x:Key="GreenBlockBrush" Color="#FF17F317" />
    <SolidColorBrush x:Key="YellowBlockBrush" Color="#FFFBFC01" />
    <SolidColorBrush x:Key="RedBlockBrush" Color="#FFE80705" />
    <SolidColorBrush x:Key="WhiteBlockBrush" Color="White" />

    <ControlTemplate x:Key="VolumeIndicatorControlTemplate" TargetType="{x:Type ProgressBar}">
        <Grid Margin="0" SnapsToDevicePixels="True">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
                <ColumnDefinition Width="4" MinWidth="2" />
                <ColumnDefinition Width="2" MinWidth="1" />
            </Grid.ColumnDefinitions>
            <Rectangle x:Name="g1" Grid.Column="1" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g2" Grid.Column="3" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g3" Grid.Column="5" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g4" Grid.Column="7" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g5" Grid.Column="9" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g6" Grid.Column="11" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g7" Grid.Column="13" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g8" Grid.Column="15" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g9" Grid.Column="17" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g10" Grid.Column="19" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g11" Grid.Column="21" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g12" Grid.Column="23" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g13" Grid.Column="25" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g14" Grid.Column="27" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g15" Grid.Column="29" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g16" Grid.Column="31" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g17" Grid.Column="33" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g18" Grid.Column="35" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g19" Grid.Column="37" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g20" Grid.Column="39" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g21" Grid.Column="41" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g22" Grid.Column="43" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g23" Grid.Column="45" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g24" Grid.Column="47" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g25" Grid.Column="49" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g26" Grid.Column="51" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g27" Grid.Column="53" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g28" Grid.Column="55" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g29" Grid.Column="57" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g30" Grid.Column="59" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g31" Grid.Column="61" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="g32" Grid.Column="63" Margin="0" Stroke="{x:Null}" VerticalAlignment="Stretch" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" />
            <Rectangle x:Name="y1" Grid.Column="65" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y2" Grid.Column="67" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y3" Grid.Column="69" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y4" Grid.Column="71" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y5" Grid.Column="73" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y6" Grid.Column="75" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y7" Grid.Column="77" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y8" Grid.Column="79" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y9" Grid.Column="81" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y10" Grid.Column="83" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y11" Grid.Column="85" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y12" Grid.Column="87" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y13" Grid.Column="89" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y14" Grid.Column="91" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y15" Grid.Column="93" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y16" Grid.Column="95" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y17" Grid.Column="97" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y18" Grid.Column="99" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y19" Grid.Column="101" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y20" Grid.Column="103" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y21" Grid.Column="105" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="y22" Grid.Column="105" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r1" Grid.Column="107" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r2" Grid.Column="109" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r3" Grid.Column="111" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r4" Grid.Column="113" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r5" Grid.Column="115" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r6" Grid.Column="117" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r7" Grid.Column="119" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r8" Grid.Column="121" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="r9" Grid.Column="123" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
            <Rectangle x:Name="w1" Grid.Column="125" Margin="0" Stroke="{x:Null}" StrokeThickness="0" MinWidth="3" ScrollViewer.VerticalScrollBarVisibility="Disabled" Fill="{x:Null}" VerticalAlignment="Stretch" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="i4:LevelHelper.Level" Value="G1">
                <Setter Property="Fill" TargetName="g1" Value="{DynamicResource GreenBlockBrush}" />
            </Trigger>
            <!-- Some triggers have been removed - but you get the idea -->         
            <Trigger Property="i4:LevelHelper.Level" Value="W1">
                <Setter Property="Fill" TargetName="g1" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g2" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g3" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g4" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g5" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g6" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g7" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g8" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g9" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g10" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g11" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g12" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g13" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g14" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g15" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g16" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g17" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g18" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g19" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g20" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g21" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g22" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g23" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g24" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g25" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g26" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g27" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g28" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g29" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g30" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g31" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="g32" Value="{DynamicResource GreenBlockBrush}" />
                <Setter Property="Fill" TargetName="y1" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y2" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y3" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y4" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y5" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y6" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y7" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y8" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y9" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y10" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y11" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y12" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y13" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y14" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y15" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y16" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y17" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y18" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y19" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y20" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y21" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="y22" Value="{DynamicResource YellowBlockBrush}" />
                <Setter Property="Fill" TargetName="r1" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="r2" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="r3" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="r4" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="r5" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="r6" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="r7" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="r8" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="r9" Value="{DynamicResource RedBlockBrush}" />
                <Setter Property="Fill" TargetName="w1" Value="{DynamicResource WhiteBlockBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>
</ResourceDictionary>
Advertisements

One Response to “Digital Peak Level Meter – XAML Markup”

  1. […] source can be found here, the XAML mark-up here, and the simple test application source […]

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: