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