<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CalendarData"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Xaml="using:C1.Xaml" xmlns:DateTimeEditors="using:C1.Xaml.DateTimeEditors"
    x:Class="CalendarData.AppointmentPage"
    mc:Ignorable="d">
    <Page.Resources>
        <Style x:Key="textStyle" TargetType="TextBlock" BasedOn="{StaticResource BaselineTextStyle}">
            <Setter Property="FontSize" Value="20"/>
            <Setter Property="LineHeight" Value="24"/>
            <Setter Property="Margin" Value="10"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>

    </Page.Resources>

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="641*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="400"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Xaml:C1DockPanel HorizontalAlignment="Stretch" Grid.Column="1" VerticalAlignment="Stretch" >
            <Button Margin="10" Xaml:C1DockPanel.Dock="Right" Content="Save" Width="100" Click="save_Click" />
            <Button Margin="10" Xaml:C1DockPanel.Dock="Right" Content="Cancel" Width="100" Click="cancel_Click"/>
            <TextBlock Text="Subject: " Xaml:C1DockPanel.Dock="Left" Style="{StaticResource textStyle}"/>
            <TextBox x:Name="Subject" HorizontalAlignment="Stretch" Margin="10" VerticalAlignment="Center"/>
        </Xaml:C1DockPanel>
        <TextBox x:Name="Description" Grid.Column="1" HorizontalAlignment="Stretch" Margin="10" Grid.Row="1" TextWrapping="Wrap" VerticalAlignment="Stretch"/>
        <StackPanel HorizontalAlignment="Stretch" Grid.Row="0" VerticalAlignment="Stretch" Grid.RowSpan="2">
            <TextBlock HorizontalAlignment="Left" Text="Start:" VerticalAlignment="Top" Style="{StaticResource textStyle}"/>
            <DateTimeEditors:C1DateTimePicker x:Name="Start"/>
            <TextBlock HorizontalAlignment="Left" Text="End:" VerticalAlignment="Top" Style="{StaticResource textStyle}"/>
            <DateTimeEditors:C1DateTimePicker x:Name="End" MinDate="{Binding DateTime, ElementName=Start}"/>
            <TextBlock HorizontalAlignment="Left" Text="Location:" VerticalAlignment="Top" Style="{StaticResource textStyle}"/>
            <TextBox x:Name="Location" TextWrapping="NoWrap" HorizontalAlignment="Stretch"/>
        </StackPanel>
    </Grid>
</Page>