Sic01/FrameworkLocal/UIClient/Ctrlib/UnitControls/ChillerControl.xaml

29 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2023-01-16 11:14:35 +08:00
<UserControl
x:Class="MECF.Framework.UI.Client.Ctrlib.UnitControls.ChillerControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
xmlns:d="http://schemas.microsoft.com/ expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
x:Name="Self"
mc:Ignorable="d">
<UserControl.Resources>
<converters:bool2VisibilityConverter x:Key="Bool2VisibilityConvert" />
</UserControl.Resources>
<Viewbox>
<Image x:Name="imagePicture" Source="pack://application:,,,/MECF.Framework.UI.Client;component/Resources/Images/units/chiller_right_off.png">
<Image.ContextMenu>
<ContextMenu Visibility="{Binding ElementName=Self, Path=EnableControl, Converter={StaticResource Bool2VisibilityConvert}, Mode=OneWay}">
<MenuItem
Click="ChillerOn"
Header="Chiller On"
IsEnabled="{Binding ElementName=Self, Path=EnableControl, Mode=OneWay}" />
<MenuItem
Click="ChillerOff"
Header="Chiller Off"
IsEnabled="{Binding ElementName=Self, Path=EnableControl, Mode=OneWay}" />
</ContextMenu>
</Image.ContextMenu>
</Image>
</Viewbox>
</UserControl>