<Page x:Class="ThickTcpUiInWindow.Page_GageInfo"
      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:ThickTcpUiInWindow"
      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:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
                <!--<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Culture/StringResource.zh-CN.xaml"/>-->
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid Name="grid_null"/>
        <StackPanel Orientation="Horizontal" Background="{StaticResource Background_Title}">
            <Button Style="{StaticResource ButtonStyle_back2}" Command="BrowseBack"/>
            <TextBlock Style="{StaticResource TextBlockStyle_Title}"  Text="{DynamicResource strGageInfo}"/>
        </StackPanel>


        <Grid Grid.Row="1" Margin="0,5,0,5">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" />
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button Width="150" Margin="0,5,5,5" Click="button_start_Click" >
                <Grid>
                    <TextBlock Text="{DynamicResource strRecord}" Style="{StaticResource TextBlockStyle_ItemHeader}" Visibility="{Binding IsRunning, Converter={StaticResource visbilityconv}, ConverterParameter=HiddenWhenTrue}" />
                    <TextBlock Text="{DynamicResource strStop}" Style="{StaticResource TextBlockStyle_ItemHeader}" Visibility="{Binding IsRunning, Converter={StaticResource visbilityconv}}"/>
                </Grid>
                <Button.Style>
                    <Style BasedOn="{StaticResource ResourceKey=ButtonStyle3}" TargetType="Button">
                        <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>
