PostSharp.Samples / PostSharp.Samples.Xaml / FancyTextBlock.xaml
<UserControl x:Class="PostSharp.Samples.Xaml.FancyTextBlock"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:PostSharp.Samples.Xaml"
             mc:Ignorable="d">
    <Border BorderThickness="3" Padding="5"
            DataContext="{Binding RelativeSource={RelativeSource AncestorType=local:FancyTextBlock}}">
        <Border.BorderBrush>
            <RadialGradientBrush>
                <GradientStop Color="Yellow" Offset="0" />
                <GradientStop Color="Red" Offset="1" />
            </RadialGradientBrush>
        </Border.BorderBrush>
        <TextBlock Text="{Binding Path=Text, FallbackValue='Hello, world'}" />
    </Border>
</UserControl>