<UserControl x:Class="StammGenerator.Views.ProjektEditView"
             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:StammGenerator.Views"
             xmlns:viewmodel="clr-namespace:StammGenerator.ViewModel"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <DataTemplate DataType="{x:Type viewmodel:ProjektSettingsViewModel}">
            <local:ProjektSettings />
        </DataTemplate>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="450" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <!-- Stammdaten Grid -->
        <Grid Grid.Column="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150" />
                <ColumnDefinition Width="300" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>

            <Label Grid.Column="0" Grid.Row="0" Content="Projektname" />
            <Label Grid.Column="0" Grid.Row="1" Content="Erstelldatum" />
            <Label Grid.Column="0" Grid.Row="2" Content="Strasse" />
            <Label Grid.Column="0" Grid.Row="3" Content="Ort" />
            <Label Grid.Column="0" Grid.Row="4" Content="Auftraggeber" />

            <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding ProjektName}" />
            <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Erstelldatum}" />
            <TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Strasse}" />
            <TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Ort}" />
            <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="4">
                <Label Content="{Binding Auftraggeber.Name}" />
                <Button Content="Ändern" Command="{Binding AuftraggeberChange}" />
            </StackPanel>
            <StackPanel Grid.ColumnSpan="2" Grid.Row="5">
                <Button Content="Speichern" Command="{Binding Speichern}" />
            </StackPanel>
        </Grid>
        <ContentPresenter Grid.Column="1" Content="{Binding ProjektSettingsViewModel}" />
    </Grid>
</UserControl>
