<Window x:Class="StructureHelper.Windows.BeamShears.DistributedLoadView"
        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.BeamShears"
        xmlns:uc="clr-namespace:StructureHelper.Windows.UserControls"
        d:DataContext="{d:DesignInstance local:DistributedLoadViewModel}"
        mc:Ignorable="d"
        Title="Uniformly Distributed Load" Height="250" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <TabControl>
            <TabItem Header="Main">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Name"/>
                    <TextBox Grid.Column="1" Text="{Binding Name}"/>
                    <TextBlock Grid.Row="1" Text="Load value"/>
                    <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding LoadValue, Converter={StaticResource DistributedLoadConverter}}"/>
                </Grid>
            </TabItem>
            <TabItem Header="Factors">
                <uc:FactoredCombination Grid.Row="1" DataContext="{Binding CombinationProperty}"/>
            </TabItem>
            <TabItem Header="Misc.">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Grid.Row="0" Text="Substract ratio"/>
                    <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding LoadRatio, Converter={StaticResource PlainDouble}}"/>
                    <TextBlock Grid.Row="1" Text="Relative applying level"/>
                    <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding RelativeLevel, Converter={StaticResource PlainDouble}}"/>
                    <TextBlock Grid.Row="2" Text="Start point"/>
                    <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding StartCoordinate, Converter={StaticResource LengthConverter}}"/>
                    <TextBlock Grid.Row="3" Text="End point"/>
                    <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding EndCoordinate, Converter={StaticResource LengthConverter}}"/>
                </Grid>
            </TabItem>
        </TabControl>

        <ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
    </Grid>
</Window>
