문제

I want to set text "Foreground" with rgb in the FlowDocument.

How can I do this?

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> "; 
도움이 되었습니까?

해결책

You need represent argb in hex format where a = ff, r = 01, g = 02, b =03

Foreground=\"ff010203\"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top