<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c1BarCode="using:C1.Xaml.BarCode">

    <DataTemplate x:Key="defaultEncodingExceptionTemplate">
        <TextBlock Text="{Binding Message}" FontSize="20" Width="150" Height="150" Foreground="Red" FontStyle="Italic" TextWrapping="Wrap"></TextBlock>
    </DataTemplate>
    
    <Style TargetType="c1BarCode:C1BarCode">
        <Setter Property="EncodingExceptionTemplate" Value="{StaticResource defaultEncodingExceptionTemplate}">
        </Setter>
        <Setter Property="Background" Value="White" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1BarCode:C1BarCode">
                    <Border
                     	Background="{TemplateBinding Background}"
                        	BorderBrush="{TemplateBinding BorderBrush}"
                        	BorderThickness="{TemplateBinding BorderThickness}">
                    	<Grid x:Name="LayoutRoot" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>
