星火微课系统客户端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

UC_MultiRangeSlider.xaml 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <UserControl x:Class="XHWK.WKTool.UC_MultiRangeSlider"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:XHWK.WKTool.UControl"
  7. mc:Ignorable="d" Name="UC_Arrange" Loaded="UC_Arrange_Loaded">
  8. <StackPanel Orientation="Horizontal" Height="{Binding ElementName=UC_Arrange,Path=SilderHeight}" >
  9. <TextBox Text="{Binding ElementName=SL_Bat1,Path=Value,Mode=TwoWay}"
  10. KeyUp="TextBox_KeyUp1" Visibility="Hidden"
  11. Width="10"
  12. Margin="0,3" BorderBrush="CornflowerBlue" HorizontalAlignment="Left" VerticalAlignment="Center" />
  13. <Canvas Width="{Binding ElementName=UC_Arrange,Path=SilderWidth}" Margin="0">
  14. <Slider Name="SL_Bat1"
  15. Value="{Binding ElementName=UC_Arrange,Path=StartValue}"
  16. Minimum="{Binding ElementName=UC_Arrange,Path=Minimum}"
  17. Maximum="{Binding ElementName=UC_Arrange,Path=Maximum}"
  18. SelectionStart="{Binding ElementName=UC_Arrange,Path=StartValue}"
  19. SelectionEnd="{Binding ElementName=UC_Arrange,Path=EndValue}"
  20. Width="{Binding ElementName=UC_Arrange,Path=SilderWidth}"
  21. TickFrequency="{Binding ElementName=UC_Arrange,Path=SliderTickFrequency}"
  22. FocusVisualStyle="{x:Null}"
  23. IsSelectionRangeEnabled="True"
  24. TickPlacement="TopLeft"
  25. IsSnapToTickEnabled="True"
  26. VerticalAlignment="Center"
  27. Margin="2"
  28. ValueChanged="SL_Bat1_ValueChanged">
  29. <Slider.Clip>
  30. <RectangleGeometry Rect="{Binding ElementName=UC_Arrange,Path=StartRect}" />
  31. </Slider.Clip>
  32. </Slider>
  33. <Slider Name="SL_Bat2"
  34. Value="{Binding ElementName=UC_Arrange,Path=EndValue}"
  35. Minimum="{Binding ElementName=UC_Arrange,Path=Minimum}"
  36. Maximum="{Binding ElementName=UC_Arrange,Path=Maximum}"
  37. SelectionStart="{Binding ElementName=UC_Arrange,Path=StartValue}"
  38. SelectionEnd="{Binding ElementName=UC_Arrange,Path=EndValue}"
  39. Width="{Binding ElementName=UC_Arrange,Path=SilderWidth}"
  40. TickFrequency="{Binding ElementName=UC_Arrange,Path=SliderTickFrequency}"
  41. FocusVisualStyle="{x:Null}"
  42. IsSelectionRangeEnabled="True"
  43. TickPlacement="TopLeft"
  44. IsSnapToTickEnabled="True"
  45. VerticalAlignment="Center"
  46. Margin="2"
  47. ValueChanged="SL_Bat2_ValueChanged">
  48. <Slider.Clip>
  49. <RectangleGeometry Rect="{Binding ElementName=UC_Arrange,Path=EndRect}" />
  50. </Slider.Clip>
  51. </Slider>
  52. </Canvas>
  53. <TextBox KeyUp="TextBox_KeyUp2" Visibility="Hidden"
  54. Text="{Binding ElementName=SL_Bat2,Path=Value,Mode=TwoWay}"
  55. Width="10" Margin="0,3"
  56. BorderBrush="CornflowerBlue" HorizontalAlignment="Right" VerticalAlignment="Center"/>
  57. </StackPanel>
  58. </UserControl>