开发者

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>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜