1
除了重写整个RichTextBox
控件之外,有没有办法将内置着色器效果(例如DropShadowEffect)应用于特定的文本或甚至是Paragraph
或Run
?Silverlight RichTextBox Shader效果
除了重写整个RichTextBox
控件之外,有没有办法将内置着色器效果(例如DropShadowEffect)应用于特定的文本或甚至是Paragraph
或Run
?Silverlight RichTextBox Shader效果
您可以使用可以容纳UIElements并将效果应用于这些UIElements的InlineUIContainer。这并不漂亮,但它的工作原理。
<RichTextBox>
<Paragraph>
Displaying text with inline image
<InlineUIContainer>
<TextBlock Text="Hello World"><TextBlock.Effect><DropShadowEffect/></TextBlock.Effect></TextBlock>
</InlineUIContainer>
</Paragraph>