<Page x:Class="FLY.Thick.Base.UI.PgGageInfo"
      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" 
      mc:Ignorable="d" 
      xmlns:Chr="clr-namespace:System.Windows.Forms.DataVisualization.Charting;assembly=System.Windows.Forms.DataVisualization"
      xmlns:local ="clr-namespace:FLY.Thick.Base.UI" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
      d:DesignHeight="768" d:DesignWidth="1024"
      Loaded="Page_Loaded" Unloaded="Page_Unloaded"
	Title="Page_GageInfo">
    <Page.Resources>
        <ResourceDictionary>
        </ResourceDictionary>
    </Page.Resources>
    <Grid Background="{StaticResource Brushes.ThemeBackground}">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid Background="{StaticResource Brushes.TitleBar.Background}" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal" >
                <Button Style="{StaticResource Styles.TitleBar.BackButton2}" Command="BrowseBack"   >
                    <iconPacks:PackIconMaterial Kind="ArrowLeftThick" />
                </Button>
                <TextBlock Style="{StaticResource Styles.TitleBar.Text}"  Text="{StaticResource str.PgGageInfo.Title}"/>
            </StackPanel>
            <local:CtMicroGage Grid.Column="1" x:Name="mircoGage" Background="Transparent" VerticalAlignment="Bottom"/>
        </Grid>
        <Grid Grid.Row="1" Margin="0,5,0,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" />
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button Click="button_start_Click" >
                <TextBlock >
                    <TextBlock.Style>
                        <Style TargetType="TextBlock" BasedOn="{StaticResource Styles.ParamSection.Text}" >
                            <Setter Property="Text" Value="{StaticResource str.PgGageInfo.Record}"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding IsRunning}" Value="True">
                                    <Setter Property="Text" Value="停止"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Style>
                </TextBlock>
                <Button.Style>
                    <Style TargetType="Button" BasedOn="{StaticResource Styles.ParamSection.Button}" >
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsRunning}" Value="True">
                                <Setter Property="Background" Value="{StaticResource Brushes.Fault}"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>

            </Button>
            <Grid Grid.Column="1" Margin="{StaticResource ControlMargin}">
                <Grid.RowDefinitions>
                    <RowDefinition  Height="Auto"/>
                    <RowDefinition  />
                </Grid.RowDefinitions>
                <ProgressBar Name="progressBar1" VerticalAlignment="Top" Height="10" Value="{Binding Progress}"/>
                <WindowsFormsHost Grid.Row="1" >
                    <Chr:Chart x:Name="chart1"/>
                </WindowsFormsHost>
                
            </Grid>

        </Grid>
    </Grid>
</Page>
