Switch.xaml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <UserControl x:Class="NEIntelligentControl2.Views.BoostStation.Switch"
  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:NEIntelligentControl2.Views.BoostStation"
  7. mc:Ignorable="d"
  8. Width="18" Height="23.4" Background="{DynamicResource BoostStationBackground}" MouseLeftButtonDown="UserControl_MouseLeftButtonDown" Loaded="UserControl_Loaded">
  9. <Grid>
  10. <Grid.Style>
  11. <Style TargetType="Grid">
  12. <Style.Triggers>
  13. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=IsSelected}" Value="True">
  14. <Setter Property="Effect">
  15. <Setter.Value>
  16. <DropShadowEffect ShadowDepth="0" BlurRadius="9" Color="WhiteSmoke"/>
  17. </Setter.Value>
  18. </Setter>
  19. </DataTrigger>
  20. </Style.Triggers>
  21. </Style>
  22. </Grid.Style>
  23. <Viewbox Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Width}" Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Height}" x:Name="vd">
  24. <Viewbox.Style>
  25. <Style TargetType="Viewbox">
  26. <Style.Triggers>
  27. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="-1">
  28. <Setter Property="Visibility" Value="Visible"/>
  29. </DataTrigger>
  30. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="0">
  31. <Setter Property="Visibility" Value="Collapsed"/>
  32. </DataTrigger>
  33. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="1">
  34. <Setter Property="Visibility" Value="Collapsed"/>
  35. </DataTrigger>
  36. </Style.Triggers>
  37. </Style>
  38. </Viewbox.Style>
  39. <Canvas Name="cd" Width="17.266" Height="22.442">
  40. <Canvas.RenderTransform>
  41. <TranslateTransform X="-1010.2" Y="-646.02"/>
  42. </Canvas.RenderTransform>
  43. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="1010.2" Y1="647.27" X2="1027.5" Y2="647.27" Name="line2" StrokeThickness="2.5" Stroke="DarkGray" StrokeMiterLimit="10"/>
  44. <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Fill="DarkGray">
  45. <Path.Data>
  46. <PathGeometry Figures="m1016.8 663.86c0-1.421 1.156-2.576 2.569-2.576 1.423 0 2.574 1.157 2.574 2.576s-1.158 2.57-2.574 2.57c-1.417 4e-3 -2.569-1.151-2.569-2.57m-2.029 0c0 2.543 2.061 4.604 4.604 4.604s4.604-2.062 4.604-4.604c0-2.544-2.063-4.605-4.604-4.605-2.548 0-4.604 2.061-4.604 4.605z" FillRule="NonZero"/>
  47. </Path.Data>
  48. </Path>
  49. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="1025.8" Y1="649.43" X2="1018.9" Y2="660.25" Name="line6" StrokeThickness="2" Stroke="DarkGray" StrokeMiterLimit="10"/>
  50. </Canvas>
  51. </Viewbox>
  52. <Viewbox Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Width}" Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Height}" x:Name="vg">
  53. <Viewbox.Style>
  54. <Style TargetType="Viewbox">
  55. <Style.Triggers>
  56. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="0">
  57. <Setter Property="Visibility" Value="Visible"/>
  58. </DataTrigger>
  59. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="-1">
  60. <Setter Property="Visibility" Value="Collapsed"/>
  61. </DataTrigger>
  62. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="1">
  63. <Setter Property="Visibility" Value="Collapsed"/>
  64. </DataTrigger>
  65. </Style.Triggers>
  66. </Style>
  67. </Viewbox.Style>
  68. <Canvas Name="cg" Width="17.266" Height="22.442">
  69. <Canvas.RenderTransform>
  70. <TranslateTransform X="-1010.2" Y="-646.02"/>
  71. </Canvas.RenderTransform>
  72. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="1010.2" Y1="647.27" X2="1027.5" Y2="647.27" StrokeThickness="2.5" Stroke="#FF1B9D3A" StrokeMiterLimit="10"/>
  73. <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Fill="#FF1B9D3A">
  74. <Path.Data>
  75. <PathGeometry Figures="m1016.8 663.86c0-1.421 1.156-2.576 2.569-2.576 1.423 0 2.574 1.157 2.574 2.576s-1.158 2.57-2.574 2.57c-1.417 4e-3 -2.569-1.151-2.569-2.57m-2.029 0c0 2.543 2.061 4.604 4.604 4.604s4.604-2.062 4.604-4.604c0-2.544-2.063-4.605-4.604-4.605-2.548 0-4.604 2.061-4.604 4.605z" FillRule="NonZero"/>
  76. </Path.Data>
  77. </Path>
  78. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="1025.8" Y1="649.43" X2="1018.9" Y2="660.25" StrokeThickness="2" Stroke="#FF1B9D3A" StrokeMiterLimit="10"/>
  79. </Canvas>
  80. </Viewbox>
  81. <Viewbox Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Width}" Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Height}" x:Name="vr">
  82. <Viewbox.Style>
  83. <Style TargetType="Viewbox">
  84. <Style.Triggers>
  85. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="1">
  86. <Setter Property="Visibility" Value="Visible"/>
  87. </DataTrigger>
  88. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="0">
  89. <Setter Property="Visibility" Value="Collapsed"/>
  90. </DataTrigger>
  91. <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}, Path=Value}" Value="-1">
  92. <Setter Property="Visibility" Value="Collapsed"/>
  93. </DataTrigger>
  94. </Style.Triggers>
  95. </Style>
  96. </Viewbox.Style>
  97. <Canvas Name="cr" Width="3.4" Height="4.3442">
  98. <Canvas.RenderTransform>
  99. <TranslateTransform X="-1248.5" Y="-178.76"/>
  100. </Canvas.RenderTransform>
  101. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="1248.5" Y1="179" X2="1251.9" Y2="179" StrokeThickness=".4883" Stroke="#FFA61F24" StrokeMiterLimit="1.9531"/>
  102. <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Fill="#FFA61F24">
  103. <Path.Data>
  104. <PathGeometry Figures="m1250.2 181.7c0.3 0 0.5 0.2 0.5 0.5s-0.2 0.5-0.5 0.5-0.5-0.2-0.5-0.5 0.2-0.5 0.5-0.5m0-0.4c-0.5 0-0.9 0.4-0.9 0.9s0.4 0.9 0.9 0.9 0.9-0.4 0.9-0.9-0.4-0.9-0.9-0.9z" FillRule="NonZero"/>
  105. </Path.Data>
  106. </Path>
  107. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="1250.2" Y1="179" X2="1250.2" Y2="181.5" StrokeThickness=".3906" Stroke="#FFA61F24" StrokeMiterLimit="1.9531"/>
  108. </Canvas>
  109. </Viewbox>
  110. </Grid>
  111. </UserControl>