终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

114 lines
5.0 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.CustomResource.UserControls.ConveyBelt2"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. d:DesignHeight="450"
  9. d:DesignWidth="800"
  10. mc:Ignorable="d">
  11. <Border x:Name="br">
  12. <Viewbox HorizontalAlignment="Center" VerticalAlignment="Center">
  13. <Canvas
  14. Width="{Binding ElementName=br, Path=ActualWidth}"
  15. Height="{Binding ElementName=br, Path=ActualHeight}"
  16. Margin="5"
  17. Background="Transparent">
  18. <Rectangle
  19. Canvas.Top="20"
  20. Width="{Binding ElementName=br, Path=ActualWidth}"
  21. Height="5"
  22. HorizontalAlignment="Center"
  23. RadiusX="1"
  24. RadiusY="1">
  25. <Rectangle.Fill>
  26. <LinearGradientBrush>
  27. <GradientStop Offset="0" Color="#00BEFA" />
  28. <GradientStop Offset="0.3" Color="#ddd" />
  29. <GradientStop Offset="0.7" Color="#ddd" />
  30. <GradientStop Offset="1" Color="#00BEFA" />
  31. </LinearGradientBrush>
  32. </Rectangle.Fill>
  33. </Rectangle>
  34. <Rectangle
  35. x:Name="recDown"
  36. Width="{Binding ElementName=br, Path=ActualWidth}"
  37. Height="5"
  38. Margin="0,80,0,0"
  39. HorizontalAlignment="Center"
  40. RadiusX="1"
  41. RadiusY="1">
  42. <Rectangle.Fill>
  43. <LinearGradientBrush>
  44. <!--<GradientStop Offset="0" Color="LightGray" />
  45. <GradientStop Offset="0.5" Color="White" />
  46. <GradientStop Offset="1" Color="LightGray" />-->
  47. <GradientStop Offset="0" Color="#00BEFA" />
  48. <GradientStop Offset="0.3" Color="#ddd" />
  49. <GradientStop Offset="0.7" Color="#ddd" />
  50. <GradientStop Offset="1" Color="#00BEFA" />
  51. </LinearGradientBrush>
  52. </Rectangle.Fill>
  53. </Rectangle>
  54. <Path
  55. x:Name="belt"
  56. Canvas.Left="10"
  57. Canvas.Top="20"
  58. StrokeDashArray="2"
  59. StrokeThickness="20">
  60. <Path.Stroke>
  61. <LinearGradientBrush>
  62. <GradientStop Offset="0" Color="#00BEFA" />
  63. <GradientStop Offset="0.3" Color="#ddd" />
  64. <GradientStop Offset="0.7" Color="#ddd" />
  65. <GradientStop Offset="1" Color="#00BEFA" />
  66. </LinearGradientBrush>
  67. </Path.Stroke>
  68. </Path>
  69. </Canvas>
  70. </Viewbox>
  71. <VisualStateManager.VisualStateGroups>
  72. <VisualStateGroup Name="StockGroup">
  73. <VisualState Name="RunState">
  74. <Storyboard RepeatBehavior="Forever">
  75. <DoubleAnimation
  76. Storyboard.TargetName="belt"
  77. Storyboard.TargetProperty="StrokeDashOffset"
  78. From="0"
  79. To="-100"
  80. Duration="0:0:20" />
  81. </Storyboard>
  82. </VisualState>
  83. <!--<VisualState Name="Stop" />-->
  84. </VisualStateGroup>
  85. <VisualStateGroup Name="DirectionGroup">
  86. <VisualState Name="LeftState">
  87. <Storyboard RepeatBehavior="Forever">
  88. <DoubleAnimation
  89. Storyboard.TargetName="belt"
  90. Storyboard.TargetProperty="StrokeDashOffset"
  91. From="0"
  92. To="100"
  93. Duration="0:0:20" />
  94. </Storyboard>
  95. </VisualState>
  96. <VisualState Name="Stop" />
  97. <VisualState Name="RightState">
  98. <Storyboard RepeatBehavior="Forever">
  99. <DoubleAnimation
  100. Storyboard.TargetName="belt"
  101. Storyboard.TargetProperty="StrokeDashOffset"
  102. From="0"
  103. To="-100"
  104. Duration="0:0:20" />
  105. </Storyboard>
  106. </VisualState>
  107. </VisualStateGroup>
  108. </VisualStateManager.VisualStateGroups>
  109. </Border>
  110. </UserControl>