<Window x:Class="StructureHelper.Windows.CalculationWindows.CalculatorsViews.ValueDiagrams.ValueDiagramEntityView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:StructureHelper.Windows.CalculationWindows.CalculatorsViews.ValueDiagrams"
        xmlns:uc="clr-namespace:StructureHelper.Windows.UserControls"
        xmlns:enums="clr-namespace:StructureHelper.Infrastructure.Enums"
        d:DataContext="{d:DesignInstance local:ValueDiagramEntityViewModel}"
        mc:Ignorable="d"
        Title="Value Diagram" Height="250" Width="300" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <StackPanel>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="22"/>
                    <RowDefinition Height="22"/>
                    <RowDefinition Height="22"/>
                    <RowDefinition Height="15"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" Text="Take"/>
                <CheckBox Grid.Column="1" Margin="0,3" IsChecked="{Binding IsTaken}"/>
                <TextBlock Grid.Row="1" Text="Name"/>
                <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Name}"/>
                <TextBlock Grid.Row="2" Text="Step number"/>
                <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding ValueDiagram.StepNumber}"/>
            </Grid>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="22"/>
                    <RowDefinition Height="22"/>
                    <RowDefinition Height="22"/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Column="1" Grid.Row="0" Margin="30,0,0,0" Text="X"/>
                <TextBlock Grid.Column="2" Grid.Row="0" Margin="30,0,0,0"  Text="Y"/>
                <TextBlock Grid.Row="1" Text="Start point"/>
                <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding ValueDiagram.Point2DRange.StartPoint.X, Converter={StaticResource LengthConverter}}"/>
                <TextBox Grid.Column="2" Grid.Row="1" Text="{Binding ValueDiagram.Point2DRange.StartPoint.Y, Converter={StaticResource LengthConverter}}"/>
                <TextBlock Grid.Row="2" Text="End point"/>
                <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding ValueDiagram.Point2DRange.EndPoint.X, Converter={StaticResource LengthConverter}}"/>
                <TextBox Grid.Column="2" Grid.Row="2" Text="{Binding ValueDiagram.Point2DRange.EndPoint.Y, Converter={StaticResource LengthConverter}}"/>
            </Grid>
        </StackPanel>
        
        <ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
    </Grid>
</Window>
