Resumurof

Resumurof

  • NA
  • 50
  • 6.2k

Coloring text using wpf

May 19 2016 8:57 AM
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)