1
Good afternoon,
I’m completely new to WPF, so forgive me if the question is stupid. I need to format two strings that are contained in the same paragraph, one in bold, and the other in normal text.
I did it this way:
Bold sting1 = new Bold(new Run(string.Format("{0}:", item.Chave))); // primeira parte
Run string2= new Run(string.Format("\t{0}", item.Valor)); // segunda parte
p1 = new Paragraph(string1).Inlines.Add(string2);// p1 já foi declarado como Block em outra parte do código
In doing so, I get the following error:
"Cannot implicitly Convert type void to System.Windows.Documents.Block"
I’d appreciate it if someone had a light. Thank you very much for your attention.
You’re adding these strings where?
– Aline
Add at the end: flowDoc.Document.Blocks.Add(P1); But I already got it here. I really appreciate your help. =)
– Aline Vianna