<Page x:Class="B20UVLog.Pages.YMeasureData"
      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:B20UVLog.Pages" 
      xmlns:My="clr-namespace:MyWPFControl.Controls;assembly=MyWPFControl" 
      xmlns:viewmodels="clr-namespace:B20UVLog.ViewModels"
      xmlns:sys="clr-namespace:System;assembly=mscorlib"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="YMeasureData">
    <Page.DataContext>
        <viewmodels:YMeasureDataViewModel/>
    </Page.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <!--<TextBlock Grid.Row="0" Text="Y Measure Data" FontSize="25" Margin="10 5"/>-->
        <StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center">
            <!--<My:MTextBox x:Name="TextIndex" Title="Index_No"/>-->
            <My:MDateTimePicker x:Name="DTPStart" Title="开始时间"/>
            <TextBlock Text="--" VerticalAlignment="Center" Margin="2"/>
            <My:MDateTimePicker x:Name="DTPEnd" Title="结束时间"/>
            <My:MButton x:Name="BtnSearch" Content="查询" Type="Primary"  Click="BtnSearch_Click"/>
            <My:MButton x:Name="BtnReset" Content="条件重置"  Click="BtnReset_Click"/>
            <!--<My:MButton x:Name="BtnExport" Content="导出报表"  Click="BtnExport_Click" Type="Warning"/>-->
        </StackPanel>
        <StackPanel x:Name="DP" Grid.Row="2">
            <My:MPagination x:Name="MyPagination" DockPanel.Dock="Bottom"  
                            PageIndexChange="MyPagination_PageIndexChange"
                            IsShowPageSize="False" IsShowTotalNum="False"
                            PageSize="11"/>

            <My:MDataGrid ItemsSource="{Binding GridData}" 
                          VerticalGridLinesBrush="{StaticResource DefaultBorderBrush}"
                          Stripe="True"
                          HeadersVisibility="None"
                          Margin="2 10 2 0"
                          HorizontalAlignment="Left"
                          BorderBrush="{StaticResource DefaultBorderBrush}"
                          BorderThickness="1 1 0 0">
                <DataGrid.Resources>
                    <DataGridLength x:Key="ColumnWidth">100</DataGridLength>
                </DataGrid.Resources>
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding DetermineLocNo}" Width="50"/>
                    <DataGridTextColumn Binding="{Binding Point1Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding Point2Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding Point3Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding Point4Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding Point5Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding Point6Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding Point7Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding Point8Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding Point9Value}" Width="{StaticResource ColumnWidth}"/>
                    <DataGridTextColumn Binding="{Binding RecordTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
                </DataGrid.Columns>
            </My:MDataGrid>
            <StackPanel Orientation="Horizontal" Margin="2 5 2 5">
                <StackPanel.Resources>
                    <Style TargetType="TextBlock">
                        <Setter Property="Width" Value="100"/>
                        <Setter Property="Margin" Value="0"/>
                        <Setter Property="Padding" Value="5 0 0 0"/>
                        <Setter Property="FontSize" Value="15"/>
                        <Setter Property="FontWeight" Value="Bold"/>
                        <!--<Setter Property="Background" Value="Red"/>-->
                    </Style>
                </StackPanel.Resources>
                <TextBlock Width="50">POS</TextBlock>
                <TextBlock>Point 1</TextBlock>
                <TextBlock>Point 2</TextBlock>
                <TextBlock>Point 3</TextBlock>
                <TextBlock>Point 4</TextBlock>
                <TextBlock>Point 5</TextBlock>
                <TextBlock>Point 6</TextBlock>
                <TextBlock>Point 7</TextBlock>
                <TextBlock>Point 8</TextBlock>
                <TextBlock>Point 9</TextBlock>
            </StackPanel>
        </StackPanel>

    </Grid>

</Page>
