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? 开发者_StackOverflow中文版 Is a textblock a good control to start with?
You can use the Run tag.
<TextBlock><Run Foreground="Red">T</Run>ex<Run Foreground="Green">t</Run></TextBlock>
精彩评论