<UserControl x:Class="HistoryView.Controls.HisProgressBar"
             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" 
             xmlns:local="clr-namespace:HistoryView.Controls"
             mc:Ignorable="d" 
             x:Name="This">


    <Border x:Name="bor" BorderBrush="Gray"  BorderThickness="1" CornerRadius="0">
        <ItemsControl ItemsSource="{Binding ElementName=This, Path=RealtimeData}" >
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <ProgressBar Orientation="Vertical" Value="{Binding Value}" Width="4" Margin="-1,0,0,0" ToolTip="{Binding Value}"
                                 Maximum="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:HisProgressBar}}, Path=MaxValue}" 
                                 Foreground="{Binding Bursh}" BorderBrush="Transparent" BorderThickness="0" Background="Transparent"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <UniformGrid Rows="1"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </Border>


</UserControl>
