ChillerControl.xaml 1.4 KB

12345678910111213141516171819202122
  1. <UserControl x:Class="MECF.Framework.UI.Client.Ctrlib.UnitControls.ChillerControl"
  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/
  6. expression/blend/2008"
  7. xmlns:converters="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
  8. mc:Ignorable="d" x:Name="Self" >
  9. <UserControl.Resources>
  10. <converters:bool2VisibilityConverter x:Key="Bool2VisibilityConvert"/>
  11. </UserControl.Resources>
  12. <Viewbox>
  13. <Image x:Name="imagePicture" Source="pack://application:,,,/MECF.Framework.UI.Client;component/Resources/Images/units/chiller_right_off.png" >
  14. <Image.ContextMenu>
  15. <ContextMenu Visibility="{Binding ElementName=Self, Path=EnableControl,Converter= {StaticResource Bool2VisibilityConvert}, Mode=OneWay}">
  16. <MenuItem Header="Chiller On" IsEnabled="{Binding ElementName=Self, Path=EnableControl,Mode=OneWay}" Click="ChillerOn"/>
  17. <MenuItem Header="Chiller Off" IsEnabled="{Binding ElementName=Self, Path=EnableControl,Mode=OneWay}" Click="ChillerOff" />
  18. </ContextMenu>
  19. </Image.ContextMenu>
  20. </Image>
  21. </Viewbox>
  22. </UserControl>