ValveRound.xaml 1.2 KB

12345678910111213141516171819202122232425
  1. <UserControl x:Class="Aitex.Core.UI.Control.ValveRound"
  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. mc:Ignorable="d"
  7. Height="43" Width="43">
  8. <UserControl.RenderTransform>
  9. <RotateTransform x:Name="rotateTransform" Angle="0" CenterX="21.5" CenterY="21.5"/>
  10. </UserControl.RenderTransform>
  11. <Canvas>
  12. <Image Source="pack://application:,,,/MECF.Framework.Common;component/Resources/Valve/ValveClosed.png" Name="imagePicture">
  13. <Image.ContextMenu>
  14. <ContextMenu>
  15. <MenuItem Header="快阀开" Click="SetValve" Tag="0" />
  16. <MenuItem Header="慢阀开" Click="SetValve" Tag="1" />
  17. <MenuItem Header="快阀关" Click="SetValve" Tag="2" />
  18. <MenuItem Header="慢阀关" Click="SetValve" Tag="3" />
  19. </ContextMenu>
  20. </Image.ContextMenu>
  21. </Image>
  22. </Canvas>
  23. </UserControl>