| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 | <UserControl x:Class="PunkHPX8_Themes.UserControls.ReserviorControl"             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:local="clr-namespace:PunkHPX8_Themes.UserControls"             xmlns:converters="clr-namespace:PunkHPX8_Themes.Converters"             mc:Ignorable="d" x:Name="self"             d:DesignHeight="130" d:DesignWidth="{Binding ElementName=self,Path=ReserviorInfo.Width}">    <UserControl.Resources>        <LinearGradientBrush StartPoint="0,0" EndPoint="1,1" x:Key="defaultColor">            <GradientStop Color="Silver" Offset="0.0" />            <GradientStop Color="WhiteSmoke" Offset="0.2" />            <GradientStop Color="White" Offset="0.5" />            <GradientStop Color="WhiteSmoke" Offset="0.75" />            <GradientStop Color="Silver" Offset="1" />        </LinearGradientBrush>        <converters:IntToColorConverter x:Key="intToColorConvert"/>    </UserControl.Resources>    <Grid>        <Grid.RowDefinitions>            <RowDefinition Height="103*"/>            <RowDefinition Height="14*"/>            <RowDefinition Height="13*"/>        </Grid.RowDefinitions>        <!--Background="{Binding ElementName=self, Path=ReserviorStatus, Converter={StaticResource intToColorConvert2}}"-->        <Viewbox Stretch="Fill" Grid.RowSpan="3">            <Canvas Width="{Binding ElementName=self,Path=ReserviorInfo.Width}" Height="130" MouseLeftButtonUp="Canvas_MouseLeftButtonUp">                <Canvas.Style>                    <Style>                        <Style.Triggers>                            <DataTrigger Binding="{Binding ElementName=self,Path=ReserviorStatus}" Value="0">                                <Setter Property="Canvas.Background" Value="Yellow"/>                            </DataTrigger>                            <DataTrigger Binding="{Binding ElementName=self,Path=ReserviorStatus}" Value="1">                                <Setter Property="Canvas.Background" Value="{StaticResource defaultColor}"/>                            </DataTrigger>                            <DataTrigger Binding="{Binding ElementName=self,Path=ReserviorStatus}" Value="2">                                <Setter Property="Canvas.Background" Value="Lime"/>                            </DataTrigger>                            <DataTrigger Binding="{Binding ElementName=self,Path=ReserviorStatus}" Value="3">                                <Setter Property="Canvas.Background" Value="DarkGray"/>                            </DataTrigger>                            <DataTrigger Binding="{Binding ElementName=self,Path=ReserviorStatus}" Value="4">                                <Setter Property="Canvas.Background" Value="Red"/>                            </DataTrigger>                        </Style.Triggers>                    </Style>                </Canvas.Style>                <!--<Canvas.Background>                    <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">                        <GradientStop Color="Silver" Offset="0.0" />                        <GradientStop Color="WhiteSmoke" Offset="0.2" />                        <GradientStop Color="White" Offset="0.5" />                        <GradientStop Color="WhiteSmoke" Offset="0.75" />                        <GradientStop Color="Silver" Offset="1" />                    </LinearGradientBrush>                </Canvas.Background>-->                <Rectangle Width="{Binding ElementName=self,Path=ReserviorInfo.Width}" Height="130" Stroke="DarkGray" StrokeThickness="1" >                </Rectangle>                <!--<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">                    <ItemsControl ItemsSource="{Binding ReserviorInfo.Cells, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" >                        <ItemsControl.ItemsPanel>                            <ItemsPanelTemplate>                                <WrapPanel Orientation="Horizontal"/>                            </ItemsPanelTemplate>                        </ItemsControl.ItemsPanel>                        <ItemsControl.ItemTemplate>                            <DataTemplate>                                <local:WaferHolderProcessCell CellName="{Binding CellName}" WaferHolderVisible="{Binding HasWaferHolder}" Margin="10,0"></local:WaferHolderProcessCell>                            </DataTemplate>                        </ItemsControl.ItemTemplate>                    </ItemsControl>                </WrapPanel>-->                <StackPanel Width="{Binding ElementName=self,Path=ReserviorInfo.Width}" Canvas.Top="108">                    <TextBlock Text="{Binding ElementName=self,Path=ReserviorInfo.Name}"   HorizontalAlignment="Center"></TextBlock>                </StackPanel>            </Canvas>        </Viewbox>    </Grid></UserControl>
 |