Silverlight RichTextBox Shader Effects
Aside from rewriting the entire RichTextBox
control, is there a way to apply the built-in shader effects (e.g. DropShadowEffect) to a specific piece of text or even开发者_如何学运维 a Paragraph
or Run
?
You can use the InlineUIContainer which can hold UIElements and apply Effects to those UIElements. It's not pretty, but it works.
<RichTextBox>
<Paragraph>
Displaying text with inline image
<InlineUIContainer>
<TextBlock Text="Hello World"><TextBlock.Effect><DropShadowEffect/></TextBlock.Effect></TextBlock>
</InlineUIContainer>
</Paragraph>
精彩评论