将笔划应用于XAML中的文本块

tnw*_*tnw 5 c# silverlight wpf xaml

我有一个Silverlight应用程序,我想给我textblock一个大纲(不是文本块,字符本身),也称为stroke.

我发现这个问题适用于WPF,但有没有办法在使用时完成此操作XAML/Silverlight(PresentationFramework不是Silverlight程序集)?是否有现有的实施?

Tic*_*ico 8

按照@Chris W.的想法,我提出了这个代码,虽然不是最好的解决方案,但它的工作原理是:

<StackPanel>

    <!-- With DropShadow -->
    <TextBlock Foreground="#FFFF0000" Text="With DropShadow" FontSize="16">
        <TextBlock.Effect>
            <DropShadowEffect ShadowDepth="0" BlurRadius="1" Color="#FF000000" />
        </TextBlock.Effect>
    </TextBlock>

     <!-- No DropShadow -->
    <TextBlock Foreground="#FFFF0000" Text="No DropShadow" FontSize="16" />

</StackPanel>
Run Code Online (Sandbox Code Playgroud)