textblock某个特定字符的颜色的动态改变解决方法

textblock某个特定字符的颜色的动态改变想在wp7代码中动态的控制textblock文字的其中某一个字的颜色的改变

textblock某个特定字符的颜色的动态改变
想在wp7代码中动态的控制textblock文字的其中某一个字的颜色的改变
例如文字为“Hello World”想把其中的“o”都改变成红色,应该怎么做呢?

[解决办法]
有一点点复杂

C# code
string text = textBlock1.Text;            textBlock1.Inlines.Clear();            int index, start = 0;            char c = 'o'; //要替换的字符            while ((index = text.IndexOf(c, start)) != -1)            {                textBlock1.Inlines.Add(new Run() {Text = text.Substring(start, index-start)});                textBlock1.Inlines.Add(new Run() {Text = c.ToString(), Foreground = new SolidColorBrush(Colors.Red)});                start = index + 1;            }            if (start < text.Length)                textBlock1.Inlines.Add(new Run() {Text = text.Substring(start) });