<phone:PhoneApplicationPage 
    x:Class="Controls.Pages.ListBoxPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">
   
    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock x:Name="ApplicationTitle" Text="WINDOWS PHONE 7" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="ListBox" Margin="-3,-8,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>
        
        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentGrid" Grid.Row="1">
            <!-- normale ListBox & mit Mehrfachauswahl -->
            <ListBox Height="81" HorizontalAlignment="Left" Margin="24,29,0,0" Name="listBox1" VerticalAlignment="Top" Width="444">
                <ListBoxItem Content="Listeneintrag 1" />
                <ListBoxItem Content="Listeneintrag 2" />
                <ListBoxItem Content="Listeneintrag 3" />
                <ListBoxItem Content="Listeneintrag 4" />
                <ListBoxItem Content="Listeneintrag 5" />
                <ListBoxItem Content="Listeneintrag 6" />
            </ListBox>
            <ListBox Height="84" HorizontalAlignment="Left" Margin="24,135,0,0" Name="listBox2" VerticalAlignment="Top" Width="444" SelectionMode="Multiple">
                <ListBoxItem Content="Mehrfachauswahl Listeneintrag 1" />
                <ListBoxItem Content="Mehrfachauswahl Listeneintrag 2" />
                <ListBoxItem Content="Mehrfachauswahl Listeneintrag 3" />
                <ListBoxItem Content="Mehrfachauswahl Listeneintrag 4" />
                <ListBoxItem Content="Mehrfachauswahl Listeneintrag 5" />
                <ListBoxItem Content="Mehrfachauswahl Listeneintrag 6" />
            </ListBox>          
        
            <!-- Listbox mit Content Controls -->
            <ListBox Height="165" HorizontalAlignment="Left" Margin="24,239,0,0" Name="listBox3" VerticalAlignment="Top" Width="444" SelectionMode="Extended">
                <ListBoxItem>
                    <CheckBox Name="checkBox1">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="CheckBox mit TextBlock"/>
                            <Image Source="/ApplicationIcon.png" Height="43" Width="43" VerticalAlignment="Top" Margin="10,0,20,0"/>                    
                        </StackPanel>
                    </CheckBox>                
                </ListBoxItem>
                <ListBoxItem>
                    <CheckBox Name="checkBox2">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="CheckBox mit TextBlock"/>
                        <Image Source="/ApplicationIcon.png" Height="43" Width="43" VerticalAlignment="Top" Margin="10,0,20,0"/>
                    </StackPanel>
                    </CheckBox>
                </ListBoxItem>
                <ListBoxItem>
                    <CheckBox Name="checkBox3">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="CheckBox mit TextBlock"/>
                            <Image Source="/ApplicationIcon.png" Height="43" Width="43" VerticalAlignment="Top" Margin="10,0,20,0"/>
                        </StackPanel>
                    </CheckBox>
                </ListBoxItem>
                <ListBoxItem>
                    <CheckBox Name="checkBox4">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="CheckBox mit TextBlock"/>
                            <Image Source="/ApplicationIcon.png" Height="43" Width="43" VerticalAlignment="Top" Margin="10,0,20,0"/>
                        </StackPanel>
                    </CheckBox>
                </ListBoxItem>
            </ListBox>

            <!-- ListBox mit dynamischen Eintraegen via ItemTemplate und Datenbindung -->
            <ListBox Height="201" HorizontalAlignment="Left" Margin="6,410,0,0" Name="listBox4" VerticalAlignment="Top" Width="475" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Grid.Row="0" Height="Auto" HorizontalAlignment="Left" Margin="0,0,0,0" Name="gridPerson" VerticalAlignment="Top" Width="480" ShowGridLines="True" >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="95*"/>
                                <ColumnDefinition Width="123*" />
                                <ColumnDefinition Width="81*" />
                                <ColumnDefinition Width="181*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="40"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>

                            <TextBlock Height="30" HorizontalAlignment="Left" Margin="6,14,0,10" Name="lbFirstName" Text="Vorname:" VerticalAlignment="Center" Width="89" Grid.Row="0" />
                            <TextBlock Height="30" HorizontalAlignment="Left" Margin="0,14,0,10" Name="tbFirstName" Text="{Binding FirstName}" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0" Width="123" />
                            <TextBlock Height="30" HorizontalAlignment="Left" Margin="13,13,0,10" Name="lbLastName" Text="Name:" VerticalAlignment="Center" Grid.Column="2" Grid.Row="0" />
                            <TextBlock Height="30" HorizontalAlignment="Left" Margin="0,14,0,10" Name="tbLastname" Text="{Binding LastName}" VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" Width="175" />

                            <ItemsControl Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" ItemsSource="{Binding Orders}">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel >
                                            <TextBlock  Text="{Binding ID}"/>
                                            <TextBlock Text="{Binding Info}"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>             
            </ListBox>
        </Grid>
    </Grid>  
</phone:PhoneApplicationPage>
