<UserControl x:Class="SewerStammGen.WPF.Views.HaltungEditView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:SewerStammGen.WPF.Views"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
   
    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="600" />
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <Label Grid.Row="0" Grid.Column="0" Content="Obere Schacht" />
                <Label Grid.Row="1" Grid.Column="0" Content="Untere Schacht" />
                <Label Grid.Row="2" Grid.Column="0" Content="Haltungsbezeichnung" />

                <ComboBox Grid.Row="0" Grid.Column="1" Width="200" HorizontalAlignment="Left" Margin="5,5,5,5" DisplayMemberPath="Objektbezeichnung" SelectedIndex="{Binding SelectedObenIndex}" ItemsSource="{Binding AvSchaechte}"></ComboBox>
                <ComboBox Grid.Row="1" Grid.Column="1" Width="200" HorizontalAlignment="Left" Margin="5,5,5,5" DisplayMemberPath="Objektbezeichnung" SelectedIndex="{Binding SelectedUntenIndex}" ItemsSource="{Binding AvSchaechte}"></ComboBox>
                <TextBox Grid.Row="2" Grid.Column="1" Width="200" HorizontalAlignment="Left" Margin="5" Text="{Binding Haltungsbezeichnung}" />
            </Grid>

            <Grid Grid.Row="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200" />
                    <ColumnDefinition Width="59*" />
                    <ColumnDefinition Width="241*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <Label VerticalAlignment="Center" Grid.Column="0" Content="Material" />
                <Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" Content="Durchmesser" />
                <Label VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" Content="Haltungslänge" />
                <Label VerticalAlignment="Center" Grid.Row="3" Grid.Column="0" Content="Entwässerungsart" />

                <TextBox Grid.Row="0" Grid.Column="1" Width="200" HorizontalAlignment="Left" Margin="5,5,5,5" Text="{Binding Material}" Grid.ColumnSpan="2" />
                <TextBox Grid.Row="1" Grid.Column="1" Width="200" HorizontalAlignment="Left" Margin="5,5,5,5" Text="{Binding Durchmesser}" Grid.ColumnSpan="2" />
                <TextBox Grid.Row="2" Grid.Column="1" Width="100" HorizontalAlignment="Left" Margin="5,5,5,5" Text="{Binding Haltungslaenge}" Grid.ColumnSpan="2" />
                <DockPanel Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2">
                    <RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" />
                    <RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" />
                    <RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" />
                </DockPanel>
            </Grid>
            
            <TabPanel Grid.Row="2">
                <Button Margin="10,10,5,10" Content="Speichern" Command="{Binding Speichern}" Width="160" Height="160" HorizontalAlignment="Left" BorderThickness="2" BorderBrush="Green" />
                <Button Margin="5,10,10,10" Content="Abbrechen" Command="{Binding Abbrechen}" Width="160" Height="160" HorizontalAlignment="Left" BorderThickness="2" BorderBrush="Red"  />
            </TabPanel>
        </Grid>
    </Grid>
</UserControl>
