LockControl.xaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <UserControl x:Class="CyberX8_Themes.UserControls.LockControl"
  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:CyberX8_Themes.UserControls"
  7. mc:Ignorable="d" x:Name="self"
  8. d:DesignHeight="30" d:DesignWidth="30">
  9. <Grid>
  10. <Border x:Name="LockBody"
  11. CornerRadius="1"
  12. Width="16"
  13. Height="18" Margin="7,11,7,1" >
  14. <Border.Style>
  15. <Style TargetType="Border">
  16. <Setter Property="Background" Value="LimeGreen"/>
  17. <Style.Triggers>
  18. <DataTrigger Binding="{Binding ElementName=self, Path=IsLocked}" Value="False">
  19. <Setter Property="Background" Value="red"/>
  20. </DataTrigger>
  21. </Style.Triggers>
  22. </Style>
  23. </Border.Style>
  24. </Border>
  25. <Canvas Width="20" Height="20" Margin="4,-2,6,12">
  26. <Path StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Top" Canvas.Left="5">
  27. <Path.Style>
  28. <Style TargetType="Path">
  29. <Setter Property="Stroke" Value="LimeGreen"/>
  30. <Setter Property="Canvas.Top" Value="13.875"/>
  31. <Style.Triggers>
  32. <DataTrigger Binding="{Binding ElementName=self, Path=IsLocked}" Value="False">
  33. <Setter Property="Stroke" Value="red"/>
  34. <Setter Property="Canvas.Top" Value="8.875"/>
  35. </DataTrigger>
  36. <DataTrigger Binding="{Binding ElementName=self, Path=IsUpDown}" Value="False">
  37. <Setter Property="Canvas.Top" Value="5"/>
  38. </DataTrigger>
  39. </Style.Triggers>
  40. </Style>
  41. </Path.Style>
  42. <Path.Data>
  43. <PathGeometry>
  44. <PathFigure StartPoint="0,0">
  45. <ArcSegment Point="12,1" Size="3,4" SweepDirection="Clockwise"/>
  46. <LineSegment Point="12,10" />
  47. </PathFigure>
  48. </PathGeometry>
  49. </Path.Data>
  50. </Path>
  51. </Canvas>
  52. </Grid>
  53. </UserControl>