how to get each character of a textblock of different color in wpf?
1 Answer
Use many different runs:
<TextBlock FontSize="22"> <Run Foreground="Gold">H</Run> <Run Foreground="Maroon">e</Run> <Run Foreground="Blue">l</Run> <Run Foreground="Orange">l</Run> <Run Foreground="Brown">o</Run> </TextBlock>
This produce the result:
4ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobG5rZWt%2BenvWqZ1mrJWtwaO4zpyiZpufobyzecWoqWadkZi1bq%2FHmqmam6Savw%3D%3D