<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"
      d:DesignHeight="768" d:DesignWidth="1024"
      Loaded="Page_Loaded" Unloaded="Page_Unloaded"
      Background="White"
	Title="Page_GageInfo">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
               
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid Background="{StaticResource Background_Title}" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>
            <StackPanel Orientation="Horizontal" >
                <Button Style="{StaticResource ButtonStyle_back2}" Command="BrowseBack" />
                <TextBlock Style="{StaticResource TextBlockStyle_Title}"  Text="机架信息"/>
            </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 TextStyle_paramSection}" >
                            <Setter Property="Text" Value="录制"/>
                            <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 ButtonStyle_paramSection}" >
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsRunning}" Value="True">
                                <Setter Property="Background" Value="#FFF92626"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>

            </Button>
            <Grid Grid.Column="1" Margin="5">
                <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>
