| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309 | <UserControl x:Class="PunkHPX8_Themes.UserControls.PlatingCellUIControl"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"          xmlns:userControls="clr-namespace:PunkHPX8_Themes.UserControls"         xmlns:customControls="clr-namespace:PunkHPX8_Themes.CustomControls"         xmlns:converters="clr-namespace:PunkHPX8_Themes.Converters"         xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"         mc:Ignorable="d" Name="self"         d:DesignHeight="500" d:DesignWidth="800">    <UserControl.Resources>        <converters:BoolToVisibility2 x:Key="boolToVisibility2"></converters:BoolToVisibility2>        <converters:BoolToVisibility x:Key="boolToVisibility"></converters:BoolToVisibility>        <converters:BoolToOrientation x:Key="boolToOrientation"></converters:BoolToOrientation>        <converters:MutiBoolToBool x:Key="mutiBoolToBool"/>        <ContextMenu x:Key="CCRValve">            <MenuItem Header="Open" Click="OpenCCRValve_Click"/>            <MenuItem Header="Close" Click="CloseCCRValve_Click"/>        </ContextMenu>        <ContextMenu x:Key="RinseValve">            <MenuItem Header="Open" Click="OpenRinseValve_Click"/>            <MenuItem Header="Close" Click="CloseRinseValve_Click"/>        </ContextMenu>        <ContextMenu x:Key="CAIsolationValve">            <MenuItem Header="Open" Click="OpenCAIsolationValve_Click"/>            <MenuItem Header="Close" Click="CloseCAIsolationValve_Click"/>        </ContextMenu>        <ContextMenu x:Key="ANIsolationValve">            <MenuItem Header="Open" Click="OpenANIsolationValve_Click"/>            <MenuItem Header="Close" Click="CloseANIsolationValve_Click"/>        </ContextMenu>    </UserControl.Resources>    <Canvas RenderTransformOrigin="0,0">        <Canvas.RenderTransform>            <ScaleTransform ScaleX="1.2" ScaleY="1.2" />        </Canvas.RenderTransform>        <Rectangle Visibility="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource boolToVisibility}}" Width="270" Height="228" Fill="LightGray" Canvas.Top="176" Canvas.Left="64" Stroke="LightGray" StrokeThickness="1" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="3" Opacity="0.5"/>        <Rectangle Visibility="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource boolToVisibility2}}" Width="270" Height="228" Fill="LightGray" Canvas.Top="176" Canvas.Left="414" Stroke="LightGray" StrokeThickness="1" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="3" Opacity="0.5"/>        <Canvas Width="125" Height="75" Canvas.Left="199" Canvas.Top="234" HorizontalAlignment="Left" VerticalAlignment="Center">            <Canvas.RenderTransform>                <ScaleTransform ScaleX="0.6667" ScaleY="0.6667" />            </Canvas.RenderTransform>            <Rectangle Width="200" Height="100" Fill="Yellow" Canvas.Top="0" />            <Rectangle Width="160" Height="60" Fill="Gold" Canvas.Top="26" Canvas.Left="20" HorizontalAlignment="Left" VerticalAlignment="Center"/>            <Rectangle Width="180" Height="40" Fill="Bisque" Canvas.Top="0" Canvas.Left="7" HorizontalAlignment="Center" VerticalAlignment="Top"/>            <Polygon Points="0,20 10,0 20,20" Fill="Yellow" Canvas.Left="7" Canvas.Top="0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Top">                <Polygon.RenderTransform>                    <TransformGroup>                        <ScaleTransform/>                        <SkewTransform/>                        <RotateTransform Angle="90"/>                        <TranslateTransform/>                    </TransformGroup>                </Polygon.RenderTransform>            </Polygon>            <Polygon Points="0,20 10,0 20,20" Fill="Yellow" Canvas.Left="168" Canvas.Top="0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Center">                <Polygon.RenderTransform>                    <TransformGroup>                        <ScaleTransform/>                        <SkewTransform/>                        <RotateTransform Angle="-90"/>                        <TranslateTransform/>                    </TransformGroup>                </Polygon.RenderTransform>            </Polygon>            <Polygon Points="50,50 210,50 200,60 60,60"         Fill="White"          StrokeThickness="1" Canvas.Left="-30" Canvas.Top="-10"/>        </Canvas>        <Rectangle Width="100" Height="10" Fill="#E0F7FA" Canvas.Top="179" Canvas.Left="215" Stroke="LightGray" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Polygon Points="10,40 110,40 120,50 0,50" Fill="#E0F7FA" Canvas.Left="205" Canvas.Top="149" HorizontalAlignment="Left" VerticalAlignment="Center" Stroke="LightGray" StrokeThickness="1"/>        <Rectangle Fill="#E0F7FA"  Width="120" Height="35" Canvas.Top="199" Canvas.Left="205" Stroke="LightGray" StrokeThickness="3" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="Gold"  Width="80" Height="8" Canvas.Top="159" Canvas.Left="224" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Polygon Points="0,0 90,0 90,10 85,15 5,15 0,10" Fill="Orange" Canvas.Left="219" Canvas.Top="145" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="PeachPuff"  Width="30" Height="10" Canvas.Top="135" Canvas.Left="248" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="Thistle"  Width="3" Height="10" Canvas.Top="135" Canvas.Left="226" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="Thistle"  Width="3" Height="10" Canvas.Top="135" Canvas.Left="298" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="Thistle"  Width="85" Height="10" Canvas.Top="125" Canvas.Left="221" HorizontalAlignment="Left" VerticalAlignment="Center"  RadiusX="5" RadiusY="5"/>        <Rectangle Fill="LightGray"  Width="26" Height="5" Canvas.Top="120" Canvas.Left="250" Stroke="Gray" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Top"/>        <Rectangle Fill="LightGray"  Width="20" Height="12" Canvas.Top="108" Canvas.Left="253" Stroke="Gray" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Top"/>        <Rectangle Fill="LightGray"  Width="14" Height="4" Canvas.Top="104" Canvas.Left="256"  HorizontalAlignment="Left" VerticalAlignment="Top"/>        <Rectangle Fill="LightGray"  Width="40" Height="150" Canvas.Top="91" Canvas.Left="351" Stroke="Black" StrokeThickness="2" HorizontalAlignment="Left" VerticalAlignment="Top"/>        <Polygon Points="-20,0 60,0 80,30 120,30 140,0 220,0 220,10 150,10 120,80 80,80 50,10 -20,10" Fill="Lavender" Canvas.Left="271" Canvas.Top="95" HorizontalAlignment="Left" VerticalAlignment="Top"/>        <Rectangle Fill="Gold"  Width="80" Height="8" Canvas.Top="161" Canvas.Left="443" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Polygon Points="0,0 90,0 90,10 85,15 5,15 0,10" Fill="Orange" Canvas.Left="438" Canvas.Top="147" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="PeachPuff"  Width="30" Height="10" Canvas.Top="137" Canvas.Left="467" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="Thistle"  Width="3" Height="10" Canvas.Top="137" Canvas.Left="445" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="Thistle"  Width="3" Height="10" Canvas.Top="137" Canvas.Left="517" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="Thistle"  Width="85" Height="10" Canvas.Top="127" Canvas.Left="440"  RadiusX="5" RadiusY="5" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="LightGray"  Width="26" Height="5" Canvas.Top="122" Canvas.Left="468" Stroke="Gray" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="LightGray"  Width="20" Height="12" Canvas.Top="110" Canvas.Left="471" Stroke="Gray" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="LightGray"  Width="14" Height="4" Canvas.Top="106" Canvas.Left="474"  HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Canvas Width="125" Height="75" Canvas.Left="417" Canvas.Top="235" HorizontalAlignment="Left" VerticalAlignment="Center">            <Canvas.RenderTransform>                <ScaleTransform ScaleX="0.6667" ScaleY="0.6667" />            </Canvas.RenderTransform>            <Rectangle Width="200" Height="100" Fill="Yellow" Canvas.Top="0" />            <Rectangle Width="160" Height="60" Fill="Gold" Canvas.Top="26" Canvas.Left="20" HorizontalAlignment="Left" VerticalAlignment="Center"/>            <Rectangle Width="180" Height="40" Fill="Bisque" Canvas.Top="0" Canvas.Left="7" HorizontalAlignment="Center" VerticalAlignment="Top"/>            <Polygon Points="0,20 10,0 20,20" Fill="Yellow" Canvas.Left="7" Canvas.Top="0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Top">                <Polygon.RenderTransform>                    <TransformGroup>                        <ScaleTransform/>                        <SkewTransform/>                        <RotateTransform Angle="90"/>                        <TranslateTransform/>                    </TransformGroup>                </Polygon.RenderTransform>            </Polygon>            <Polygon Points="0,20 10,0 20,20" Fill="Yellow" Canvas.Left="168" Canvas.Top="0" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Center">                <Polygon.RenderTransform>                    <TransformGroup>                        <ScaleTransform/>                        <SkewTransform/>                        <RotateTransform Angle="-90"/>                        <TranslateTransform/>                    </TransformGroup>                </Polygon.RenderTransform>            </Polygon>            <Polygon Points="50,50 210,50 200,60 60,60"         Fill="White"          StrokeThickness="1" Canvas.Left="-30" Canvas.Top="-10"/>        </Canvas>        <Rectangle Width="100" Height="10" Fill="#E0F7FA" Canvas.Top="180" Canvas.Left="433" Stroke="LightGray" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Polygon Points="10,40 110,40 120,50 0,50" Fill="#E0F7FA" Canvas.Left="423" Canvas.Top="150" Stroke="LightGray" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Rectangle Fill="#E0F7FA"  Width="120" Height="35" Canvas.Top="200" Canvas.Left="423" Stroke="LightGray" StrokeThickness="3" HorizontalAlignment="Left" VerticalAlignment="Center"/>        <Label Content="To AN Tower" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Canvas.Left="77" Canvas.Top="259"/>        <Label Content="To AN Tower" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Canvas.Left="587" Canvas.Top="259"/>        <Label Content="Res Return" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Canvas.Left="583" Canvas.Top="310"/>        <Label Content="Res Return" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Canvas.Left="95" Canvas.Top="303"/>        <Label Content="Res Source" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Center" Canvas.Left="95" Canvas.Top="331"/>        <Label Content="Res Source" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Canvas.Left="579" Canvas.Top="338"/>        <Label Content="{Binding ElementName=self,Path=ModuleName}" Visibility="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource boolToVisibility2}}" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Canvas.Left="228" Canvas.Top="64"/>        <Label Content="{Binding ElementName=self,Path=ModuleName}" Visibility="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource boolToVisibility}}" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Canvas.Left="450" Canvas.Top="64"/>                <userControls:FlowPipe IsReverse="False" IsFlowing="{Binding ElementName=self,Path=CCRValve}" Height="8"  Width="140"  Canvas.Left="65"  Canvas.Top="200" RotateTransformValue="0" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe IsReverse="False" IsFlowing="{Binding ElementName=self,Path=RinseValve}" Height="8"  Width="140"  Canvas.Left="67"  Canvas.Top="224" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1"/>        <userControls:FlowPipe IsReverse="True" IsFlowing="True" Height="8"  Width="40"  Canvas.Left="160"  Canvas.Top="266" RotateTransformValue="0" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe IsReverse="True" IsFlowing="True" Height="8"  Width="60"  Canvas.Left="161"  Canvas.Top="313" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe IsReverse="True" IsFlowing="{Binding ElementName=self,Path=CAIsolationValve}" Height="8"  Width="110"  Canvas.Left="160"  Canvas.Top="339" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe IsReverse="True" IsFlowing="{Binding ElementName=self,Path=ANIsolationValve}" Height="8"  Width="80"  Canvas.Left="236"  Canvas.Top="367" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe IsReverse="False" IsFlowing="True" Height="8"  Width="50"  Canvas.Left="273"  Canvas.Top="296" RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe IsReverse="False" IsFlowing="True" Height="8"  Width="20"  Canvas.Left="225"  Canvas.Top="301" RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe IsReverse="False" IsFlowing="True" Height="8"  Width="75"  Canvas.Left="316"  Canvas.Top="299" RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="True" IsFlowing="{Binding ElementName=self,Path=CCRValve}" Height="8"  Width="140"  Canvas.Left="541"  Canvas.Top="200" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="True" IsFlowing="{Binding ElementName=self,Path=RinseValve}" Height="8"  Width="140"  Canvas.Left="541"  Canvas.Top="224" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="False" IsFlowing="True" Height="8"  Width="40"  Canvas.Left="542"  Canvas.Top="263" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Center" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="False" IsFlowing="True" Height="8"  Width="60"  Canvas.Left="518"  Canvas.Top="318" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="True" IsFlowing="{Binding ElementName=self,Path=CAIsolationValve}" Height="8"  Width="110"  Canvas.Left="470"  Canvas.Top="343" RotateTransformValue="0" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="True" IsFlowing="{Binding ElementName=self,Path=ANIsolationValve}" Height="8"  Width="80"  Canvas.Left="432"  Canvas.Top="368" RotateTransformValue="0" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="False" IsFlowing="True" Height="8"  Width="50"  Canvas.Left="476"  Canvas.Top="301" RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="False" IsFlowing="True" Height="8"  Width="20"  Canvas.Left="525"  Canvas.Top="301" RotateTransformValue="90" HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <userControls:FlowPipe  IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}" IsReverse="False" IsFlowing="True" Height="8"  Width="75"  Canvas.Left="440"  Canvas.Top="298" RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="-1"/>        <Grid Height="50" Width="100" Canvas.Left="99" Canvas.Top="188" HorizontalAlignment="Left" VerticalAlignment="Top"  >            <Grid.RowDefinitions>                <RowDefinition Height="30"></RowDefinition>                <RowDefinition Height="20"></RowDefinition>            </Grid.RowDefinitions>            <Grid Grid.Row="0">                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal"                           IsEnabled="{Binding ElementName=self,Path=IsLeftEnable}"                          Status="{Binding ElementName=self,Path=CCRValve}"                            IsCanEdit="True"                           ContextMenu="{StaticResource CCRValve}"/>            </Grid>            <Grid Grid.Row="1" >                <Label Margin="35,-80,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="CCR"  />            </Grid>        </Grid>        <Grid Height="50" Width="100" Canvas.Left="99" Canvas.Top="213" HorizontalAlignment="Left" VerticalAlignment="Top"  >            <Grid.RowDefinitions>                <RowDefinition Height="30"></RowDefinition>                <RowDefinition Height="20"></RowDefinition>            </Grid.RowDefinitions>            <Grid Grid.Row="0">                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal"                                                     IsEnabled="{Binding ElementName=self,Path=IsLeftEnable}"              Status="{Binding ElementName=self,Path=RinseValve}"                IsCanEdit="True"               ContextMenu="{StaticResource RinseValve}"/>            </Grid>            <Grid Grid.Row="1" >                <Label Margin="30,-10,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="Rinse" />            </Grid>        </Grid>        <Grid Height="50" Width="100" Canvas.Left="237" Canvas.Top="355" HorizontalAlignment="Left" VerticalAlignment="Top"  >            <Grid.RowDefinitions>                <RowDefinition Height="30"></RowDefinition>                <RowDefinition Height="20"></RowDefinition>            </Grid.RowDefinitions>            <Grid Grid.Row="0">                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal"                                                     IsEnabled="{Binding ElementName=self,Path=IsLeftEnable}"                Status="{Binding ElementName=self,Path=ANIsolationValve}"                  IsCanEdit="True"                 ContextMenu="{StaticResource ANIsolationValve}"/>            </Grid>            <Grid Grid.Row="1" >                <Label Margin="13,0,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="AN Isolation" />            </Grid>        </Grid>        <Grid Height="50" Width="100" Canvas.Left="164" Canvas.Top="328" HorizontalAlignment="Left" VerticalAlignment="Top"  >            <Grid.RowDefinitions>                <RowDefinition Height="30"></RowDefinition>                <RowDefinition Height="20"></RowDefinition>            </Grid.RowDefinitions>            <Grid Grid.Row="0">                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal"                                                     IsEnabled="{Binding ElementName=self,Path=IsLeftEnable}"                        Status="{Binding ElementName=self,Path=CAIsolationValve}"                          IsCanEdit="True"                         ContextMenu="{StaticResource CAIsolationValve}"/>            </Grid>            <Grid Grid.Row="1" >                <Label Margin="13,-20,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="CA Isolation" />            </Grid>        </Grid>        <Grid Height="50" Width="100" Canvas.Left="538" Canvas.Top="188" HorizontalAlignment="Left" VerticalAlignment="Top"  >            <Grid.RowDefinitions>                <RowDefinition Height="30"></RowDefinition>                <RowDefinition Height="20"></RowDefinition>            </Grid.RowDefinitions>            <Grid Grid.Row="0">                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal"                                                     IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}"                  Status="{Binding ElementName=self,Path=CCRValve}"                    IsCanEdit="True"                   ContextMenu="{StaticResource CCRValve}"/>            </Grid>            <Grid Grid.Row="1" >                <Label Margin="35,-80,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="CCR" />            </Grid>        </Grid>        <Grid Height="50" Width="100" Canvas.Left="538" Canvas.Top="213" HorizontalAlignment="Left" VerticalAlignment="Top"  >            <Grid.ColumnDefinitions>                <ColumnDefinition Width="21*"/>                <ColumnDefinition Width="79*"/>            </Grid.ColumnDefinitions>            <Grid.RowDefinitions>                <RowDefinition Height="30"></RowDefinition>                <RowDefinition Height="20"></RowDefinition>            </Grid.RowDefinitions>            <Grid Grid.Row="0" Grid.ColumnSpan="2">                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal"                                                     IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}"                Status="{Binding ElementName=self,Path=RinseValve}"                  IsCanEdit="True"                 ContextMenu="{StaticResource RinseValve}"/>            </Grid>            <Grid Grid.Row="1" Grid.ColumnSpan="2" >                <Label Margin="30,-20,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="Rinse" />            </Grid>        </Grid>        <Grid Height="50" Width="100" Canvas.Left="412" Canvas.Top="356" HorizontalAlignment="Left" VerticalAlignment="Top"  >            <Grid.RowDefinitions>                <RowDefinition Height="30"></RowDefinition>                <RowDefinition Height="20"></RowDefinition>            </Grid.RowDefinitions>            <Grid Grid.Row="0">                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal"                                                     IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}"                Status="{Binding ElementName=self,Path=ANIsolationValve}"                  IsCanEdit="True"                 ContextMenu="{StaticResource ANIsolationValve}"/>            </Grid>            <Grid Grid.Row="1" >                <Label Margin="13,0,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="AN Isolation" />            </Grid>        </Grid>        <Grid Height="50" Width="100" Canvas.Left="466" Canvas.Top="331" HorizontalAlignment="Left" VerticalAlignment="Top"  >            <Grid.RowDefinitions>                <RowDefinition Height="30"></RowDefinition>                <RowDefinition Height="20"></RowDefinition>            </Grid.RowDefinitions>            <Grid Grid.Row="0">                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal"                                                     IsEnabled="{Binding ElementName=self,Path=IsLeftEnable,Converter={StaticResource BoolToBool}}"                Status="{Binding ElementName=self,Path=CAIsolationValve}"                  IsCanEdit="True"                 ContextMenu="{StaticResource CAIsolationValve}"/>            </Grid>            <Grid Grid.Row="1" >                <Label Margin="13,-20,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="CA Isolation" />            </Grid>        </Grid>    </Canvas></UserControl>
 |