<flyctrllib:WindowBigClose x:Class="FLY.Thick.FilmCasting.UI.WdShrinkHelper"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
        xmlns:local="clr-namespace:FLY.Thick.FilmCasting.UI"
        Background="White"
        mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" SizeToContent="WidthAndHeight"  >
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Converters.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <local:WdShrinkHelperVm x:Key="viewmodel" />
        </ResourceDictionary>
    </Window.Resources>

    <Grid TextBlock.FontSize="24" TextBlock.FontStyle="Normal" d:DataContext="{StaticResource viewmodel}">
        <StackPanel Margin="{StaticResource ControlMargin}">
            <Grid Height="20"/>
            <StackPanel Orientation="Horizontal">
                <StackPanel>
                    <StackPanel Orientation="Horizontal" >
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="真实螺丝号1" />
                            <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding RealBoltNo1,StringFormat={}{0:0.#}}" />
                        </StackPanel>
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}"  Text="真实螺丝位2" />
                            <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding RealBoltNo2,StringFormat={}{0:0.#}}"/>
                        </StackPanel>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" >
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="显示螺丝位1" Foreground="{StaticResource Brushes.Highlight}"/>
                            <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding ShowBoltNo1,StringFormat={}{0:0.#}}" />
                        </StackPanel>
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}"  Text="显示螺丝位2" Foreground="{StaticResource Brushes.Highlight}"/>
                            <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding ShowBoltNo2,StringFormat={}{0:0.#}}"/>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Button Style="{StaticResource Styles.Button.Square.Accent2}" Command="{Binding CalCmd}" Content="计算"/>
                </StackPanel>
            </StackPanel>

  
            <StackPanel Margin="{StaticResource ControlMargin}">
                <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="结果"/>
                <StackPanel >
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="收缩率="/>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding UniformShrinkPercent,Converter={StaticResource percentconv}}"/>
                            <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="%" />
                        </StackPanel>
                    </StackPanel>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="膜中心位置偏移="/>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Style="{StaticResource Styles.Text.FieldContent}" Text="{Binding MidOffset}"/>
                            <TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="mm" />
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
                
            </StackPanel>
            <Button Style="{StaticResource  Styles.Button.Apply}" Click="button_apply_Click" />
        </StackPanel>
    </Grid>

</flyctrllib:WindowBigClose>
