1
Answer

Coloring text using wpf

Resumurof

Resumurof

8y
277
1
Im trying to color the text with differnet colors in label, but not exactly getting how to achieve it,any suggestion would be appreciated.
 
Here I'm trying to set Text1 in black color (Not achieved), and content  in CS in Yellow (Achieved). Since I already have foreground set, I'm not able to set Text1 to Black color.
 
Code
 <Label Content="{Binding Text}" ContentStringFormat="Text1: {0}" ToolTip="{Binding SM}" Foreground="{Binding CS}" FontWeight="Bold"/>
Answers (1)