<UserControl
    x:Class="BarCodeSamples.Text"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BarCodeSamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    
    <Grid Height="600" HorizontalAlignment="Center">
        <Grid.Resources>
            <Style TargetType="StackPanel">
                <Setter Property="Orientation" Value="Vertical" />
            </Style>
            <Style TargetType="TextBox">
                <Setter Property="Width" Value="300"></Setter>
            </Style>
            <DataTemplate x:Key="headerTemplate">
                <TextBlock Text="{Binding}" 
                           Foreground="{ThemeResource TextBoxForegroundHeaderThemeBrush}" 
                           FontSize="14">
                </TextBlock>
            </DataTemplate>
        </Grid.Resources>
        <StackPanel Margin="0,0,12,0">
            <TextBox Header="{Binding Caption}" 
                     HeaderTemplate="{StaticResource headerTemplate}" 
                     Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
            </TextBox>
        </StackPanel>
    </Grid>
</UserControl>
