I am writing a little diff tool and need to be able to change the color of a character depending on if its the same, added, removed. What would be the best way to handle this? Is a textblock a good control to start with?
+1
A:
You can use the Run tag.
<TextBlock><Run Foreground="Red">T</Run>ex<Run Foreground="Green">t</Run></TextBlock>
bendewey
2010-10-15 20:26:38
How would I tie that into an datatemplate?
Aaron Fischer
2010-10-15 20:42:32
@Aaron that depends, I would probably use a converter of some kind and create the Runs in code, but if you provide more details in your question I'll see what I can post for you.
bendewey
2010-10-15 20:49:36
@Aaron or just use seperate TextBlocks
bendewey
2010-10-15 20:50:03