<!--
 Copyright © 2011-2012 Nokia Corporation. All rights reserved.
 Nokia and Nokia Connecting People are registered trademarks of Nokia Corporation. 
 Other product and company names mentioned herein may be trademarks
 or trade names of their respective owners. 
 See LICENSE.TXT for license information.
-->
<phone:PhoneApplicationPage 
    x:Class="wprestaurantapp.MakeReservation"
    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"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="False">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="{Binding Path=Restaurant.Name}" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="{Binding Path=LocalizedResources.TitleReservation, Source={StaticResource LocalizedStrings}}" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0">
                <StackPanel>
                    <TextBlock Margin="12,0" Text="{Binding Path=LocalizedResources.HeaderName, Source={StaticResource LocalizedStrings}}" />
                    <TextBox Margin="0,0,0,8" Name="NameInput" InputScope="PersonalFullName" TextChanged="validateFields"/>
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Margin="12,0" Grid.Column="0" Grid.Row="0"
                                   Text="{Binding Path=LocalizedResources.HeaderTelephone, Source={StaticResource LocalizedStrings}}" />
                        <TextBox Margin="0,0,0,8" Grid.Column="0" Grid.Row="1" 
                                 Name="TelephoneInput" InputScope="Number" TextChanged="validateFields" />
                        <TextBlock Margin="12,0" Grid.Column="1" Grid.Row="0"
                                   Text="{Binding Path=LocalizedResources.HeaderTableFor, Source={StaticResource LocalizedStrings}}" />
                        <TextBox Margin="0,0,0,8"
                                 Grid.Column="1" Grid.Row="1"
                                 Name="PersonsInput" InputScope="Number" TextChanged="validateFields"/>
                    </Grid>
                    <TextBlock Margin="12,0" Grid.Column="0" Grid.Row="0"
                                   Text="{Binding Path=LocalizedResources.HeaderTime, Source={StaticResource LocalizedStrings}}" />
                    <Grid>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <!-- DatePicker and TimePicker are part of Silverlight Toolkit which does not ship as part of this
                             example. Please see release notes for instructions how to install and use Silverlight Toolkit. -->
                        <toolkit:DatePicker Margin="0,0,0,8" Grid.Column="0"
                                            x:Name="DatePicker" />
                        <toolkit:TimePicker Grid.Column="1"
                            Margin="0,0,0,16" x:Name="TimePicker" />
                    </Grid>
                </StackPanel>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>
