<UserControl x:Class="WWWings_GUI_SL5.Views.PassagierauswahlView"
    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"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*"/>
      <ColumnDefinition Width="*"/>
      <ColumnDefinition Width="*"/>
      <ColumnDefinition Width="100"/>
    </Grid.ColumnDefinitions>
    <!-- Zeile 0 -->
    <TextBlock Text="Name oder ID:" Margin="3" Grid.Row="0" Grid.Column="0"/>
    <TextBox Text="{Binding NameOderID, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Margin="3" Grid.Row="0" Grid.Column="1"/>
    <Button Content="Suchen" Command="{Binding PassagierlisteLadenCommand}" Margin="3" Grid.Row="0" Grid.Column="3"  />
    
    <!-- Zeile 1 -->
    <sdk:DataGrid AutoGenerateColumns="False"  ItemsSource="{Binding Passagierliste}" SelectedItem="{Binding AusgewählterPassagier, Mode=TwoWay}" Margin="3" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="99"
               IsReadOnly="True" SelectionMode="Single" >
      <sdk:DataGrid.Columns>
        <sdk:DataGridTextColumn Header="ID" Binding="{Binding ID}"/>
        <sdk:DataGridTextColumn Header="Vorname" Binding="{Binding Vorname}"/>
        <sdk:DataGridTextColumn Header="Nachname" Binding="{Binding Name}"/>
        <sdk:DataGridTextColumn Header="Geburtsdatum" Binding="{Binding Geburtsdatum, StringFormat=d}"/>
      </sdk:DataGrid.Columns>

    </sdk:DataGrid>

  </Grid>

</UserControl>
