<Page x:Class="JAMM.Kasse.Pages.OpenTables"
      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" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="300"
	Title="OpenTables">
    <ScrollViewer>
        <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
                    <Border Grid.Row="0">
                    <Border.Background>
                        <SolidColorBrush Color="White"></SolidColorBrush>
                    </Border.Background>
                </Border>
                <Border BorderBrush="LightGray" BorderThickness="0, 0, 0, 1">
                    <Grid>
                    <Label HorizontalAlignment="Center" FontSize="24">Offene Tische</Label>
                    </Grid>
                </Border>
                <ItemsControl Name="OpenTableView" Grid.Row="1">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Border BorderBrush="LightGray" BorderThickness="0, 0, 0, 1">
                            <Grid Margin="10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="80*"/>
                                    <ColumnDefinition Width="20*"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="{Binding Name}" Grid.Column="0" VerticalAlignment="Center"/>
                                <TextBlock Text="{Binding Sum}" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right"/>
                            </Grid>
                        </Border>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </Grid>
    </ScrollViewer>    
</Page>
