SwitchBase.xaml 2.6 KB

123456789101112131415161718192021222324252627282930313233
  1. <UserControl x:Class="NEIntelligentControl2.Views.BoostStation.SwitchBase"
  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="16.5" Height="12" Background="{DynamicResource BoostStationBackground}" MouseLeftButtonDown="UserControl_MouseLeftButtonDown" Loaded="UserControl_Loaded">
  9. <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}">
  10. <Viewbox.Style>
  11. <Style TargetType="Viewbox">
  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. </Viewbox.Style>
  23. <Canvas Name="g10" Width="16.485" Height="12.299">
  24. <Canvas.RenderTransform>
  25. <TranslateTransform X="-846.12" Y="-159.77"/>
  26. </Canvas.RenderTransform>
  27. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="854.14" Y1="159.77" X2="854.14" Y2="172.07" Name="line2" StrokeThickness="2.5" Stroke="#FF40B9B0" StrokeMiterLimit="10"/>
  28. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="862.6" Y1="165.93" X2="854.14" Y2="165.93" Name="line4" StrokeThickness="2.5" Stroke="#FF40B9B0" StrokeMiterLimit="10"/>
  29. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="850.76" Y1="162.31" X2="850.76" Y2="169.54" Name="line6" StrokeThickness="2.5" Stroke="#FF40B9B0" StrokeMiterLimit="10"/>
  30. <Line xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" X1="847.37" Y1="163.73" X2="847.37" Y2="168.12" Name="line8" StrokeThickness="2.5" Stroke="#FF40B9B0" StrokeMiterLimit="10"/>
  31. </Canvas>
  32. </Viewbox>
  33. </UserControl>