<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xml:lang="en-US"
	x:Class="WWWings_WPF.F_Flugbuchung"
	x:Name="Flugbuchung"
	Title="World Wide Wings - Flugbuchung (WPF)"
	Width="400" Height="400" Background="#FFF5F5DC" Icon="worlwidewings.ico" WindowStartupLocation="CenterScreen" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">


 <Window.Resources>
  <Storyboard x:Key="C_DrehAnimation" AutoReverse="True">
   <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="C_Buchen" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
    <SplineDoubleKeyFrame KeyTime="00:00:00.5" Value="45"/>
    <SplineDoubleKeyFrame KeyTime="00:00:01.0" Value="0"/>
    <SplineDoubleKeyFrame KeyTime="00:00:01.5" Value="90"/>
    <SplineDoubleKeyFrame KeyTime="00:00:02.0" Value="0"/>
    <SplineDoubleKeyFrame KeyTime="00:00:02.5" Value="180"/>
    <SplineDoubleKeyFrame KeyTime="00:00:03.0" Value="0"/>
    <SplineDoubleKeyFrame KeyTime="00:00:03.5" Value="360"/>
   </DoubleAnimationUsingKeyFrames>
   <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="C_Buchen" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFF4F1F4"/>
    <SplineColorKeyFrame KeyTime="00:00:00.5" Value="red"/>
    <SplineColorKeyFrame KeyTime="00:00:01" Value="yellow"/>
    <SplineColorKeyFrame KeyTime="00:00:02" Value="blue"/>
    <SplineColorKeyFrame KeyTime="00:00:02" Value="yellow"/>
    <SplineColorKeyFrame KeyTime="00:00:02.5" Value="pink"/>
    <SplineColorKeyFrame KeyTime="00:00:03" Value="yellow"/>
    <SplineColorKeyFrame KeyTime="00:00:03.5" Value="Green"/>
   </ColorAnimationUsingKeyFrames>
   <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="C_Buchen" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
    <SplineColorKeyFrame KeyTime="00:00:03.5000000" Value="white"/>
   </ColorAnimationUsingKeyFrames>
  </Storyboard>
  <SolidColorBrush Color="#FF000000" x:Key="B1"/>
 </Window.Resources>
 <Window.Triggers>
  <EventTrigger RoutedEvent="ButtonBase.Click" SourceName="C_Buchen">
   <BeginStoryboard Storyboard="{StaticResource C_DrehAnimation}"/>
  </EventTrigger>
 </Window.Triggers>
 <DockPanel>
  <Menu Height="25" DockPanel.Dock="Top"  Name="menu1" VerticalAlignment="Top" >
   <MenuItem Header="Anwendung">
    <MenuItem Header="Beenden (Klick)" Click="C_Ende_Click"></MenuItem>
    <MenuItem Header="Beenden (Command Binding)" Command="Close" ></MenuItem>
   </MenuItem>
   <MenuItem Header="Bearbeiten">
    <MenuItem Header="Rückgängig" Command="Undo"></MenuItem>
    <Separator></Separator>
    <MenuItem Header="Ausschneiden" Command="Cut"></MenuItem>
    <MenuItem Header="Kopieren" Command="Copy"></MenuItem>
    <MenuItem Header="Einfügen" Command="Paste"></MenuItem>
    <MenuItem Header="Löschen" Command="Delete"></MenuItem>
   </MenuItem>
   <MenuItem Header="Buchung">
    <MenuItem Header="Buchung ausführen" Click="C_Buchen_Click"></MenuItem>
    <MenuItem Header="Abbrechen"></MenuItem>
   </MenuItem>

   <MenuItem Header="Hintergrund">
    <MenuItem Header="Steuerelementhierarchie" Click="C_Steuerelementhierarchie_Click"></MenuItem>
   </MenuItem>
  </Menu>
  <StatusBar DockPanel.Dock="Bottom" Height="18" Background="AliceBlue" HorizontalAlignment="Left"  Name="statusBar1" VerticalAlignment="Bottom"  />
  <Grid x:Name="LayoutRoot" DockPanel.Dock="Bottom">
   <Button Height="23" Margin="0,0,120,32" x:Name="C_Buchen" Click="C_Buchen_Click" VerticalAlignment="Bottom" Cursor="Pen" Content="Buchen" HorizontalAlignment="Right" Width="75" d:IsLocked="True" >
    <Button.RenderTransform>
     <TransformGroup>
      <ScaleTransform ScaleX="1" ScaleY="1"/>
      <SkewTransform AngleX="0" AngleY="0"/>
      <RotateTransform Angle="0"/>
      <TranslateTransform X="0" Y="0"/>
     </TransformGroup>
    </Button.RenderTransform>
   </Button>

   <Button Height="23" HorizontalAlignment="Right" Margin="0,0,27,32" x:Name="C_Ende" VerticalAlignment="Bottom" Width="75" Content="Ende" Click="C_Ende_Click"  Background="#FFFFB300"  d:IsLocked="True"  />
  
   <TextBox Height="20" Margin="129,31,173,0" x:Name="C_PID" VerticalAlignment="Top" Text="1"  d:IsLocked="True"  />
   <Label Height="23.2766666666667" Margin="17.37,28.7233333333333,0,0" x:Name="label1" VerticalAlignment="Top" HorizontalAlignment="Left" Width="84.63" Content="Passagier-ID:" d:IsLocked="True"/>
   <TextBox Name="C_PName" Height="20" Margin="128.63,64.2766666666667,24.37,0" VerticalAlignment="Top" x:XmlAttributeProperties.XmlSpace="preserve"   d:IsLocked="True"   />
   <Label Height="23.2766666666667" Margin="18,62,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="84.63" Content="Passagiername:" d:IsLocked="True"/>
   <Button Height="23" HorizontalAlignment="Right" Margin="0,27,25,0" VerticalAlignment="Top" Width="75" Content="Suchen" x:Name="C_Suchen" Click="C_Suchen_Click" d:IsLocked="True" />
   <Path Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FF000000" Margin="15,90.5,27,0" VerticalAlignment="Top" Height="1" Data="M14,184 L363,184" d:IsLocked="True" />

   <ComboBox RenderTransformOrigin="0.498,0" Margin="0,0,-39.008,116.508" IsSynchronizedWithCurrentItem="True" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="135.5" Text="Alle Flüge" Height="24.5" d:IsLocked="True">
    <ComboBox.RenderTransform>
     <TransformGroup>
      <ScaleTransform ScaleX="1" ScaleY="1"/>
      <SkewTransform AngleX="0" AngleY="0"/>
      <RotateTransform Angle="90"/>
      <TranslateTransform X="0" Y="0"/>
     </TransformGroup>
    </ComboBox.RenderTransform>
   	<TextBlock Foreground="Black">Alle Flüge</TextBlock>
   	<TextBlock Foreground="green">Gebuchte Flüge</TextBlock>
   	<TextBlock Foreground="red">Nicht gebuchte Flüge</TextBlock>
   </ComboBox>

<Label Name="C_Listbox_Label" Margin="18,95.5,0,210.5" Width="104" Height="24" Content="Flüge" d:LayoutOverrides="VerticalAlignment, Width" HorizontalAlignment="Left"/>
   <ListBox Margin="18,121.5,60,71.5" IsSynchronizedWithCurrentItem="True" x:Name="C_Fluege" ItemsSource="{Binding Mode=OneWay}" HorizontalContentAlignment="Stretch" d:IsLocked="True">
    <ListBox.ItemTemplate>
     <DataTemplate>
      <Border x:Name="C_Border" BorderBrush="Blue" BorderThickness="1"
          Padding="5" Margin="5">
       <Border.ContextMenu>
        <ContextMenu>
         <MenuItem Header="Details anzeigen" Click="C_Details_Click"/>
         <MenuItem Header="Buchen" Click="C_Storno_Click"/>
        </ContextMenu>
       </Border.ContextMenu>
       <StackPanel>

        <StackPanel Orientation="Horizontal">
         <CheckBox/>
         <TextBlock Text="Flug "/>
         <TextBlock Text="{Binding Path=FlugNr}" />

         <TextBlock Text=" am "/>
         <TextBlock Text="{Binding Path=Datum}"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal">
         <TextBlock Text="von "/>
         <TextBlock Text="{Binding Path=Abflugort}"/>
         <TextBlock Text=" nach "/>
         <TextBlock Text="{Binding Path=Zielort}"/>
         <Line Stroke="LightSteelBlue"/>
        </StackPanel>
       </StackPanel>
      </Border>
      <DataTemplate.Triggers>
       <DataTrigger Binding="{Binding Path=Teilstrecken}">
        <DataTrigger.Value>1</DataTrigger.Value>
        <Setter TargetName="C_Border" Property="BorderBrush" Value="Green"/>
       </DataTrigger>
      </DataTemplate.Triggers>
     </DataTemplate>

    </ListBox.ItemTemplate>
   </ListBox>

  </Grid>
 	
 </DockPanel>
</Window>