<?xml version="1.0" encoding="utf-8"?>
<UserControl mc:Ignorable="d" x:Class="C1_Demo.AdvancedSettings" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">

    <Border x:Name="LayoutRoot">
        <Grid VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Border Grid.Column="1" VerticalAlignment="Top" Margin="0,10,10,0">
                <StackPanel>
                    <StackPanel Orientation="Horizontal" Height="30">
                		<TextBlock VerticalAlignment="Center" Width="125"><Run Text="Allow Null:" /></TextBlock>
                        <CheckBox x:Name="allowNull" VerticalAlignment="Center" IsChecked="true" />	           	
					</StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Height="30">
                    	<TextBlock VerticalAlignment="Center" Width="125"><Run Text="Custom Date Format:" /></TextBlock>
                        <ComboBox Padding="3" x:Name="dateFormatCombo" VerticalAlignment="Center" Width="140" SelectionChanged="dateFormatCombo_SelectionChanged" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Height="30">
                        <TextBlock VerticalAlignment="Center" Width="125"><Run Text="Custom Time Format:" /></TextBlock>
                        <ComboBox Padding="3" x:Name="timeFormatCombo" VerticalAlignment="Center" Width="140" SelectionChanged="timeFormatCombo_SelectionChanged" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Height="30">
                        <TextBlock VerticalAlignment="Center" Width="125"><Run Text="Date Watermark:" /></TextBlock>
                        <TextBox Padding="3" MinWidth="140" Text="{Binding DateWatermark, ElementName=dateTimePicker, Mode=TwoWay}" Width="140" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Height="30">
                        <TextBlock VerticalAlignment="Center" Width="125"><Run Text="Time Watermark:" /></TextBlock>
                        <TextBox Padding="3" MinWidth="140" Text="{Binding TimeWatermark, ElementName=dateTimePicker, Mode=TwoWay}" Width="140" />
                    </StackPanel>
                </StackPanel>
            </Border>
            <Grid Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Stretch" Margin="0,10,0,0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Border Grid.Row="0" HorizontalAlignment="Left" Margin="0,0,0,10">
                    <c1:C1DateTimePicker x:Name="dateTimePicker" AllowNull="{Binding IsChecked, ElementName=allowNull, Mode=OneWay}" />
                </Border>
                <Border HorizontalAlignment="Left" Grid.Row="1" VerticalAlignment="Bottom">
                    <StackPanel>
                        <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Height="30">
                            <TextBlock VerticalAlignment="Center" Width="70"><Run Text="DateTime:" /></TextBlock>
                            <TextBlock VerticalAlignment="Center" Text="{Binding DateTime, ElementName=dateTimePicker}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Height="30">
                            <TextBlock VerticalAlignment="Center" Width="70"><Run Text="Date Mask:" /></TextBlock>
                            <TextBlock VerticalAlignment="Center" Text="{Binding DateMask, ElementName=dateTimePicker}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Height="30">
                            <TextBlock VerticalAlignment="Center" Width="70"><Run Text="Time Mask:" /></TextBlock>
                            <TextBlock VerticalAlignment="Center" Text="{Binding TimeMask, ElementName=dateTimePicker}" />
                        </StackPanel>
                    </StackPanel>
                </Border>
            </Grid>
        </Grid>
    </Border>
</UserControl>