<Page
    x:Class="Befehlsleiste.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Befehlsleiste"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" >

    <Grid PointerReleased="Grid_PointerReleased_1" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="500"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="400"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Viewbox Grid.Column="1" Grid.Row="1" >
            <ListView Name="listview1" Width="400" Height="300"
                      Background="Bisque" 
                      SelectionChanged="listview1_SelectionChanged_1">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding}" Foreground="Black" Padding="10" />
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </Viewbox>

        <Popup Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Name="info" 
               HorizontalOffset="100" VerticalOffset="100" >
               
            <TextBlock TextWrapping="Wrap" Padding="5" Name="infoText" FontSize="32"
                       Text="Wählen Sie aus, was Sie sich heute noch Gutes tun möchten."/>
        </Popup>

    </Grid>



    <Page.BottomAppBar>
        <AppBar>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>

                <!-- kontextabhängige Befehle -->
                <StackPanel Grid.Column="0" Orientation="Horizontal" 
                            HorizontalAlignment="Left">
                    <Button Name="cmdHinzufuegen" AutomationProperties.Name="Hinzufuegen"
                            Style="{StaticResource AddAppBarButtonStyle}" 
                            Visibility="Collapsed" Click="Hinzufuegen_Click_1" />
                    <Button Name="cmdEntfernen" AutomationProperties.Name="Entfernen" 
                            Style="{StaticResource RemoveAppBarButtonStyle}" 
                            Visibility="Collapsed" Click="Entfernen_Click_1"/>
                </StackPanel>
  
                <!-- kontextunabhängige Befehle -->
                <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
                  <Button AutomationProperties.Name="Hilfe" 
                          Style="{StaticResource HelpAppBarButtonStyle}"
                          Click="Hilfe_Click_1"/>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>

</Page>
