<flyctrllib:WindowBigClose x:Class="FLY.Thick.Base.UI.WdAHelper"
        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.Base.UI"
        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>
            <local:WdAHelperVm x:Key="viewmodel"/>
        </ResourceDictionary>
    </Window.Resources>

    <Grid 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="{StaticResource str.WdAbHelper.Y}" />
                            <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding Y}" />
                        </StackPanel>
                        <StackPanel Margin="{StaticResource ControlMargin}">
                            <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}"  Text="{StaticResource str.WdAbHelper.X}" />
                            <TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding X}"/>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Button Style="{StaticResource Styles.Button.Square2}" Click="button_cal_Click" Content="{StaticResource str.WdAbHelper.Cal}"/>
                </StackPanel>
            </StackPanel>


            <StackPanel Margin="{StaticResource ControlMargin}">
                <TextBlock Style="{StaticResource Styles.Text.FieldHeader}" Text="{StaticResource str.WdAbHelper.Result}"/>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Style="{StaticResource Styles.Text.FieldContent}" >
                        <Run Text= "{StaticResource str.WdAbHelper.K}"/>=
                        <Run Text= "{Binding A, StringFormat={}{0:F3}}"/>
                    </TextBlock>
                </StackPanel>

            </StackPanel>
            <Button Style="{StaticResource  Styles.Button.Apply}" Click="button_apply_Click" />
        </StackPanel>
    </Grid>

</flyctrllib:WindowBigClose>
