<Window x:Class="MECF.Framework.UI.Client.TrayThickness.WinTrayThicknessDataView"
             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:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:micro="clr-namespace:Caliburn.Micro"
             xmlns:cal="http://www.caliburn.org"
             xmlns:local="clr-namespace:MECF.Framework.UI.Client.TrayThickness"
             mc:Ignorable="d" 
             Height="220" Width="800" >
    <Window.Resources>
        
        <Style  TargetType="TextBlock" >
            <Setter Property="FontSize" Value="13" />
            <Setter Property="TextAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="TextWrapping" Value="Wrap" />
            <Setter Property="Margin" Value="3"/>
            <Setter Property="FontFamily" Value="Arial Black"/>
        </Style>

        <Style TargetType="Border">
            <Setter Property="Background" Value="{DynamicResource Table_BG_Title}" />
            <Setter Property="BorderBrush" Value="Gray"/>
            <Setter Property="SnapsToDevicePixels" Value="True"/>
        </Style>


    </Window.Resources>


    <Grid >
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="0"/>
                <RowDefinition/>
                <RowDefinition Height="3"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <!--界面标题-->
        <Border CornerRadius="0,0,0,0" Grid.ColumnSpan="6" Background="#FF243664" >
            <TextBlock Text="Tray Coating Thickness"  FontSize="15" Foreground="White" HorizontalAlignment="Center" Padding="8,0,0,0"/>
        </Border >

        <!--首行标签-->
        <Border Grid.Row="1" Padding="5,1,0,1" BorderThickness="1,0,1,1" >
            <TextBlock Text="Component" />
        </Border>
        <Border Grid.Row="1" Grid.Column="1" Padding="5,1,0,1" BorderThickness="0,0,1,1" >
            <TextBlock Text="SN"/>
        </Border>
        <Border Grid.Row="1" Grid.Column="2" Padding="5,1,0,1" BorderThickness="0,0,1,1" >
            <TextBlock Text="Coating"/>
        </Border>
        <Border Grid.Row="1" Grid.Column="3" Padding="5,1,0,1" BorderThickness="0,0,1,1" >
            <TextBlock Text="MAX"/>
        </Border>
        <Border Grid.Row="1" Grid.Column="4" Padding="5,1,0,1" BorderThickness="0,0,1,1" >
            <TextBlock Text="PM"/>
        </Border>
        

<!--对象行-->
        <Border Grid.Row="2" Padding="5,1,0,1" BorderThickness="1,0,1,1" >
            <TextBlock Text="{Binding TrayData.Tray.Caption}"/>
        </Border>
        <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding TrayData.Tray.SerialNumber}">
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="LostFocus">
                    <micro:ActionMessage MethodName="LoadCoatingData">
                        <micro:Parameter Value="Tray" />
                    </micro:ActionMessage>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </TextBox>
        <TextBox  Grid.Row="2" Grid.Column="2" Text="{Binding TrayData.Tray.Current}" TextChanged="TextBox_TextChanged" />
        <TextBox  Grid.Row="2" Grid.Column="3" Text="{Binding TrayData.Tray.MAX}" TextChanged="TextBox_TextChanged"/>
        <ComboBox SelectedItem="{Binding PmOwned}" Grid.Row="2" Grid.Column="4" ItemsSource="{Binding PmsList}" />
        
        

        <Border Grid.Row="4" Padding="5,1,0,1" BorderThickness="1,1,1,1" >
            <TextBlock Text="{Binding TrayData.TrayInner.Caption}"/>
        </Border>
        <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding TrayData.TrayInner.SerialNumber}" >
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="LostFocus">
                    <micro:ActionMessage MethodName="LoadCoatingData">
                        <micro:Parameter Value="TrayInner" />
                    </micro:ActionMessage>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </TextBox>
        <TextBox  Grid.Row="4" Grid.Column="2" Text="{Binding TrayData.TrayInner.Current}" TextChanged="TextBox_TextChanged"/>
        <TextBox  Grid.Row="4" Grid.Column="3" Text="{Binding TrayData.TrayInner.MAX}" TextChanged="TextBox_TextChanged"/>
        <TextBox Grid.Row="4" Grid.Column="4" Text="{Binding PmOwned}" IsReadOnly="True" Background="LightGray"/>

        <Border Grid.Row="6" Padding="5,1,0,1" BorderThickness="1,1,1,1" >
            <TextBlock Text="{Binding TrayData.RingInner.Caption}"/>
        </Border>
        <TextBox Grid.Row="6" Grid.Column="1" Text="{Binding TrayData.RingInner.SerialNumber}" >
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="LostFocus">
                    <micro:ActionMessage MethodName="LoadCoatingData">
                        <micro:Parameter Value="RingInner" />
                    </micro:ActionMessage>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </TextBox>
        <TextBox Grid.Row="6" Grid.Column="2" Text="{Binding TrayData.RingInner.Current}" TextChanged="TextBox_TextChanged"/>
        <TextBox Grid.Row="6" Grid.Column="3" Text="{Binding TrayData.RingInner.MAX}" TextChanged="TextBox_TextChanged"/>
        <TextBox Grid.Row="6" Grid.Column="4" Text="{Binding PmOwned}" IsReadOnly="True" Background="LightGray"/>

        <Border Grid.Row="8" Padding="5,1,0,1" BorderThickness="1,1,1,1" >
            <TextBlock Text="{Binding TrayData.RingOuter.Caption}"/>
        </Border>
        <TextBox Grid.Row="8" Grid.Column="1" Text="{Binding TrayData.RingOuter.SerialNumber}" >
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="LostFocus">
                    <micro:ActionMessage MethodName="LoadCoatingData">
                        <micro:Parameter Value="RingOuter" />
                    </micro:ActionMessage>
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </TextBox>
        <TextBox Grid.Row="8" Grid.Column="2" Text="{Binding TrayData.RingOuter.Current}" TextChanged="TextBox_TextChanged"/>
        <TextBox Grid.Row="8" Grid.Column="3" Text="{Binding TrayData.RingOuter.MAX}" TextChanged="TextBox_TextChanged"/>
        <TextBox Grid.Row="8" Grid.Column="4" Text="{Binding PmOwned}" IsReadOnly="True" Background="LightGray"/>


        <Grid Grid.Row="1" Grid.Column="5" Grid.RowSpan="8">
            <Button
           
            Content="SET"
            HorizontalAlignment="Center" VerticalAlignment="Center">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <micro:ActionMessage MethodName="SET">
                        </micro:ActionMessage>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Button>
        </Grid>
        
        
        </Grid>

    <!--</Viewbox>-->
</Window>
