<Page x:Class="ThickTcpUiInWindow.Page_CoatingSegment"
      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" 
      d:DesignHeight="542" d:DesignWidth="778"
      Loaded="Page_Loaded" Unloaded="Page_Unloaded"
	Title="Page_GetSample">
    <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.MergedDictionaries>
        </ResourceDictionary>
    </Page.Resources>
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="496*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Background="{StaticResource Background_Title}">
            <Button Style="{StaticResource ButtonStyle_back2}" Command="BrowseBack"/>
            <TextBlock Style="{StaticResource TextBlockStyle_Title}"  Text="段长设置"/>
        </StackPanel>
        <ScrollViewer CanContentScroll="True" PanningMode="Both" Grid.Row="1" >
            <StackPanel Orientation="Vertical" >
                <StackPanel Orientation="Horizontal" >
                    <Button Style="{StaticResource ResourceKey=ButtonStyle3}" Width="150" Margin="0,5,5,5" Click="button_apply_Click" >
                        <TextBlock Style="{StaticResource TextBlockStyle_ItemHeader}" Text="参数&#x0a;应用"/>
                    </Button>
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Vertical" Margin="5">
                            <StackPanel Orientation="Horizontal">
                                <StackPanel Orientation="Vertical" Margin="5">
                                    <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="使能" />
                                    <ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding Enable}"/>
                                </StackPanel>
                                <StackPanel Orientation="Vertical" Margin="5">
                                    <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="保存" />
                                        <ToggleButton Style="{StaticResource ToggleButtonStyle1}" IsChecked="{Binding EnSave}"/>
                                </StackPanel>
                                <StackPanel Orientation="Vertical" Margin="5">
                                    <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="单文件行数" />
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding SaveCnt}" HorizontalAlignment="Left"/>
                                    </StackPanel>
                                </StackPanel>
                                <StackPanel Orientation="Vertical" Margin="5">
                                    <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="列表显示行数" />
                                    <StackPanel Orientation="Horizontal">
                                        <TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding RecentCnt}" HorizontalAlignment="Left"/>
                                    </StackPanel>
                                </StackPanel>
                            </StackPanel>


                        </StackPanel>

                        <StackPanel Orientation="Horizontal">
                            <StackPanel Orientation="Vertical" Margin="5">
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="总长报警公差" />
                                <StackPanel Orientation="Horizontal">
                                    <TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding WarningTol_Total}" HorizontalAlignment="Left"/>
                                    <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" >
                                        <Run Text="mm"/>
                                    </TextBlock>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Orientation="Vertical" Margin="5">
                                <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="留白报警公差" />
                                <StackPanel Orientation="Horizontal">
                                    <TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding WarningTol_Distance}" HorizontalAlignment="Left"/>
                                    <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" >
                                        <Run Text="mm"/>
                                    </TextBlock>
                                </StackPanel>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </ScrollViewer>
        <StackPanel Orientation="Horizontal"  Grid.Row="2" FlowDirection="RightToLeft" Margin="0,10,0,10">
            <Button Content="段长信息" Style="{StaticResource ResourceKey=ButtonStyle2}" Click="button_profile_Click" />
        </StackPanel>
    </Grid>
</Page>

