forked from 47-studio-org/PostSharp.Samples
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFancyTextBlock.xaml
18 lines (18 loc) · 978 Bytes
/
FancyTextBlock.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<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>