سؤال

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