<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:core="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
                    xmlns:local="clr-namespace:VIZ.Framework.Common">

    <core:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter" TrueVisibility="Visible" FalseVisibility="Collapsed"></core:Bool2VisibilityConverter>

    <Style TargetType="local:ShowMessageControl">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ShowMessageControl">
                    <Border Background="{TemplateBinding Background}" 
                            Visibility="{Binding Path=IsShow,RelativeSource={RelativeSource AncestorLevel=1,Mode=FindAncestor,AncestorType=local:ShowMessageControl},Converter={StaticResource Bool2VisibilityConverter}}">
                        <TextBlock Text="{Binding Path=Message,RelativeSource={RelativeSource AncestorLevel=1,Mode=FindAncestor,AncestorType=local:ShowMessageControl}}" 
                                   Margin="{TemplateBinding Padding}"
                                   VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>