<UserControl x:Class="WWWings_GUI_SL5.MainPage"
    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:vm="clr-namespace:WWWings_GUI_SL5.ViewModels"
    xmlns:v="clr-namespace:WWWings_GUI_SL5.Views"
    mc:Ignorable="d" 
    d:DesignHeight="291" d:DesignWidth="459">

  <UserControl.Resources>
    <DataTemplate DataType="vm:FlugauswahlViewModel">
      <v:FlugauswahlView />
    </DataTemplate>
    <DataTemplate DataType="vm:PassagierauswahlViewModel">
      <v:PassagierauswahlView />
    </DataTemplate>
    <DataTemplate DataType="vm:BuchungAbschließenViewModel">
      <v:BuchungAbschließenView/>
    </DataTemplate>
  </UserControl.Resources>
    <Grid x:Name="LayoutRoot" Background="White">
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="60" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>
    <!-- Zeile 0 -->
    <Image Stretch="Uniform" Source="Images/WorldWideWings_Logo.jpg" Margin="5,10,5,5" />
    <TextBlock Grid.Column="1"  Text="Flugbuchungen" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" FontWeight="Bold" Foreground="#FF0102E1" />
    <Rectangle Grid.ColumnSpan="2" Grid.Row="2" Grid.RowSpan="99">
      <Rectangle.Fill>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
          <GradientStop Color="White" Offset="0" />
          <GradientStop Color="#FF0104D7" Offset="1" />
        </LinearGradientBrush>
      </Rectangle.Fill>
    </Rectangle>

    <!-- Zeile 1 -->

    <!-- Zeile 2 -->
    <Border Grid.Row="2" Grid.ColumnSpan="2" BorderBrush="Black" BorderThickness="1" CornerRadius="10" Margin="10" Padding="10">
      <ContentControl Content="{Binding ActiveViewModel}" />
    </Border>
    <!-- Zeile 3 -->
    <Button Content="{Binding WeiterCommand.Value, FallbackValue=Weiter}" Command="{Binding WeiterCommand}"
            IsEnabled="{Binding ActiveViewModel.IsValid}"  Grid.Row="3" Grid.Column="2" Margin="5" Width="100"/>
    <TextBlock Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="21,5,0,0" Name="textBlock1" Text="world-wide-wings.de" Foreground="White" VerticalAlignment="Top" />
  </Grid>
</UserControl>
