<Window x:Class="TimeScheduler.Diagnose"
        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:local="clr-namespace:TimeScheduler"
        xmlns:vm="clr-namespace:TimeScheduler.ViewModel"
        mc:Ignorable="d"
        Title="Diagnose" Height="400" Width="600">
  <Window.DataContext>
    <vm:DiagnoseViewModel/>
  </Window.DataContext>
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition/>
    </Grid.RowDefinitions>

    <StackPanel Grid.Row="0" Orientation="Horizontal">
      <TextBlock Margin="5" VerticalAlignment="Center" Text="Monat:"/>
      <ComboBox Margin="5" ItemsSource="{Binding Months}" SelectedItem="{Binding SelectedMonth}" ItemStringFormat="{}{0:yyyy/mm}" MinWidth="120"/>
    </StackPanel>

    <ListView Grid.Row="1" Margin="3" ItemsSource="{Binding Items}">
      <ListView.View>
        <GridView>
          <GridView.Columns>
            <GridViewColumn DisplayMemberBinding="{Binding Key}" Header="Schlüssel"/>
            <GridViewColumn DisplayMemberBinding="{Binding Description}" Header="Beschreibung"/>
            <GridViewColumn DisplayMemberBinding="{Binding From}" Header="Von"/>
            <GridViewColumn DisplayMemberBinding="{Binding Till}" Header="Bis"/>
            <GridViewColumn DisplayMemberBinding="{Binding Duration}" Header="Dauer"/>
            <GridViewColumn DisplayMemberBinding="{Binding CostUnit}" Header="Kostenstelle"/>
            <GridViewColumn DisplayMemberBinding="{Binding Type}" Header="Typ"/>
          </GridView.Columns>
        </GridView>
      </ListView.View>
    </ListView>
  </Grid>
</Window>
