<Page
    x:Class="DateTimeSettings.MainPage"
    IsTabStop="false"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:DateTimeSettings"
    xmlns:c1="using:C1.Xaml"
    xmlns:c1c="using:C1.Xaml.Calendar"
    xmlns:c1d="using:C1.Xaml.DateTimeEditors"
    xmlns:c1g="using:C1.Xaml.Gauge"
    xmlns:common="using:DateTimeSettings.Common"
    xmlns:ViewModels="using:DateTimeSettings.ViewModel"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.Resources>
        <common:StringFormatConverter x:Key="stringFormatConverter" />
    </Page.Resources>


    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid Margin="120 0 46 80">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="140"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock x:Name="txtDate" Text="{Binding MyDateTime, Converter={StaticResource stringFormatConverter}, ConverterParameter='{}{0:f}'}" Grid.ColumnSpan="2" Style="{StaticResource PageHeaderTextStyle}"/>
            <c1c:C1Calendar x:Name="c1Calendar1" SelectedDate="{Binding MyDate, Mode=TwoWay}"  Grid.Row="1" SelectedDateChanged="c1Calendar1_SelectedDateChanged" TodayBrush="Transparent" SelectedDayBrush="#FF4617B4" DaysOfWeekBorderBrush="#FF4617B4" />
            <local:C1ClockGauge x:Name="c1ClockGauge1" Grid.Row="1" Grid.Column="1" Margin="20"/>
            <c1:C1DateSelector x:Name="c1DateSelector1" SelectedDate="{Binding MyDate, Mode=TwoWay}" Grid.Row="2" Margin="0 20" />
            <c1:C1TimeSelector x:Name="c1TimeSelector1" SelectedTime="{Binding MyTime, Mode=TwoWay}" Grid.Row="2" Grid.Column="1" Margin="10 0"/>
        </Grid>
    </Grid>
</Page>
