<UserControl x:Class="XHWK.WKTool.UC_MultiRangeSlider"
             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:XHWK.WKTool.UControl"
             mc:Ignorable="d" Name="UC_Arrange" Loaded="UC_Arrange_Loaded">
    <StackPanel Orientation="Horizontal" Height="{Binding ElementName=UC_Arrange,Path=SilderHeight}" >
        <TextBox Text="{Binding  ElementName=SL_Bat1,Path=Value,Mode=TwoWay}"
                 KeyUp="TextBox_KeyUp1" Visibility="Hidden"
                 Width="10"
                 Margin="0,3" BorderBrush="CornflowerBlue" HorizontalAlignment="Left" VerticalAlignment="Center" />
        <Canvas Width="{Binding ElementName=UC_Arrange,Path=SilderWidth}" Margin="0">
            <Slider Name="SL_Bat1"
                Value="{Binding ElementName=UC_Arrange,Path=StartValue}"
                Minimum="{Binding ElementName=UC_Arrange,Path=Minimum}"
                Maximum="{Binding ElementName=UC_Arrange,Path=Maximum}"
                SelectionStart="{Binding ElementName=UC_Arrange,Path=StartValue}"
                SelectionEnd="{Binding ElementName=UC_Arrange,Path=EndValue}"
                Width="{Binding ElementName=UC_Arrange,Path=SilderWidth}"
                TickFrequency="{Binding ElementName=UC_Arrange,Path=SliderTickFrequency}"
                FocusVisualStyle="{x:Null}"
                IsSelectionRangeEnabled="True"
                TickPlacement="TopLeft"
                IsSnapToTickEnabled="True"
                VerticalAlignment="Center"
                Margin="2"
                ValueChanged="SL_Bat1_ValueChanged">
                <Slider.Clip>
                    <RectangleGeometry Rect="{Binding ElementName=UC_Arrange,Path=StartRect}" />
                </Slider.Clip>
            </Slider>
            <Slider Name="SL_Bat2"
                Value="{Binding ElementName=UC_Arrange,Path=EndValue}"
                Minimum="{Binding ElementName=UC_Arrange,Path=Minimum}"
                Maximum="{Binding ElementName=UC_Arrange,Path=Maximum}"
                SelectionStart="{Binding ElementName=UC_Arrange,Path=StartValue}"
                SelectionEnd="{Binding ElementName=UC_Arrange,Path=EndValue}"
                Width="{Binding ElementName=UC_Arrange,Path=SilderWidth}"
                TickFrequency="{Binding ElementName=UC_Arrange,Path=SliderTickFrequency}"
                FocusVisualStyle="{x:Null}"
                IsSelectionRangeEnabled="True"
                TickPlacement="TopLeft"
                IsSnapToTickEnabled="True"
                VerticalAlignment="Center"
                Margin="2"
                ValueChanged="SL_Bat2_ValueChanged">
                <Slider.Clip>
                    <RectangleGeometry Rect="{Binding ElementName=UC_Arrange,Path=EndRect}" />
                </Slider.Clip>
            </Slider>
        </Canvas>
        <TextBox   KeyUp="TextBox_KeyUp2" Visibility="Hidden"
                  Text="{Binding  ElementName=SL_Bat2,Path=Value,Mode=TwoWay}"
                 Width="10" Margin="0,3"
                 BorderBrush="CornflowerBlue" HorizontalAlignment="Right" VerticalAlignment="Center"/>
    </StackPanel>

</UserControl>
