<Window x:Class="StructureHelper.Windows.BeamShears.SectionView"
        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:SectionViewModel}"
        mc:Ignorable="d"
        Title="Beam shear section" Height="400" Width="300" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <ResourceDictionary Source="/Infrastructure/UI/Resources/Materials.xaml"/>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <TabControl>
            <TabItem Header="Main">
                <StackPanel x:Name="ShapeStackPanel">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="25"/>
                            <RowDefinition/>
                        </Grid.RowDefinitions>
                        <TextBlock Text="Name"/>
                        <TextBox Grid.Column="1" Text="{Binding Name}"/>
                    </Grid>
                    <!--ShapeEditTemplates.xaml-->
                </StackPanel>
            </TabItem>
            <TabItem Header="Concrete" DataContext="{Binding ConcreteMaterial}">
                <!--Material.xaml-->
                <ContentControl ContentTemplate="{StaticResource ConcreteMaterial}" Content="{Binding}"/>
            </TabItem>
            <TabItem Header="Reinforcement">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="25"/>
                        <RowDefinition Height="25"/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Area"/>
                    <TextBox Grid.Column="1" Text="{Binding ReinforcementArea, Converter={StaticResource AreaConverter}}"/>
                    <TextBlock Grid.Row="1" Text="Cover to center of rebars"/>
                    <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding CenterCover, Converter={StaticResource LengthConverter}}"/>
                    <ContentControl Grid.Row="2" Grid.ColumnSpan="2" ContentTemplate="{StaticResource ReinforcementMaterial}" Content="{Binding ReinforcementMaterial}"/>
                </Grid>
            </TabItem>
            <TabItem Header="Visual">
                <uc:PrimitiveVisualProperty ObjectVisual="{Binding VisualProperty}"/>
            </TabItem>
        </TabControl>
        <ContentControl Grid.Row="1" ContentTemplate="{StaticResource OkCancelButtons}" Content="{Binding}"/>
    </Grid>
</Window>
