我想在FlowDocument中使用rgb设置文本“Foreground”

时间:2013-03-18 12:44:07

标签: .net xaml flowdocument

我想设置文字"前景"在FlowDocument中使用rgb。

我该怎么做?

String ^text = "<FlowDocument \
xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" \
xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" \
<Paragraph> \
<Span FontSize=\"18\" Foreground=\"Red\">Some text in the paragraph.</Span> \
Some text that is not bold. \
</Paragraph> \
</FlowDocument> "; 

1 个答案:

答案 0 :(得分:0)

您需要以十六进制格式表示 argb ,其中a = ff,r = 01,g = 02,b = 03

Foreground=\"ff010203\"