开发者

Silverlight RichTextBox does not pick up background

I have a popup window like this,

<control开发者_开发问答s:ChildWindow Background="Aquamarine">
    <RichTextBox>
        <Paragraph x:Name="WarningMessage" >
            <Run>Test 1234</Run>
        </Paragraph>
    </RichTextBox>
</controls:ChildWindow>

I've removed most of the xaml for clarity, but the problem is that I have set the child window to have a background of Aquamarine, but the rich text box control still has a white background.

Is there any way to make the rich text control use the colour of the parent control?


RichTextBox's template defines default background as white. To change it you have to set Background property of the RichTextBox to different color. In your case "Transparent" color will do the trick.

<RichTextBox Background="Transparent">
...
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜