<UserControl
    x:Class="BasicLibrarySamples.View.MaskedTextBoxSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BasicLibrarySamples.View"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:c1="using:C1.Xaml"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    <UserControl.Resources>
        <Style x:Key="controlCaptionStyle"  TargetType="TextBlock">
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Margin" Value="10"/>
            <Setter Property="FontSize" Value="14"/>
        </Style>

        <Style x:Key="maskedTextBoxStyle" TargetType="c1:C1MaskedTextBox">
            <Setter Property="Margin" Value="0, 10, 10, 10"/>
        </Style>
    </UserControl.Resources>
    <Grid ><!--Background="{StaticResource ApplicationPageBackgroundThemeBrush}"-->
        <Grid HorizontalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="300"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <TextBlock Text="ID:" Style="{StaticResource controlCaptionStyle}"/>
            <c1:C1MaskedTextBox Grid.Column="1"  Mask="AAA-00-0000" Style="{StaticResource maskedTextBoxStyle}"/>

            <TextBlock Grid.Row="1" Text="DOB:" Style="{StaticResource controlCaptionStyle}"/>
            <c1:C1MaskedTextBox Grid.Row="1" Grid.Column="1" Mask="00/00/0000" Style="{StaticResource maskedTextBoxStyle}"/>

            <TextBlock Grid.Row="2" Text="Phone:" Style="{StaticResource controlCaptionStyle}"/>
            <c1:C1MaskedTextBox Grid.Row="2" Grid.Column="1" Mask="(999) 000-0000" TextMaskFormat="IncludePrompt" Style="{StaticResource maskedTextBoxStyle}"/>

            <TextBlock Grid.Row="3" Text="State:" Style="{StaticResource controlCaptionStyle}"/>
            <c1:C1MaskedTextBox Grid.Row="3" Grid.Column="1" Mask="AA" TextMaskFormat="IncludePrompt" Style="{StaticResource maskedTextBoxStyle}"/>
        </Grid>
    </Grid>
</UserControl>
