Windows 8の新機能を使用しておりRichEditBox
、テキスト範囲を選択してテキストの色を変更しようとしています。以下のコードは、選択したテキストに下線を付けて背景を変更しますが、変更されForegroundColor
ず、テキストは黒のままです。
result.Document.SetText(Windows.UI.Text.TextSetOptions.None, "Hello World");
var range = result.Document.GetRange(0, 5);
range.CharacterFormat.Underline = Windows.UI.Text.UnderlineType.DoubleWave;
range.CharacterFormat.ForegroundColor = Windows.UI.Color.FromArgb(255, 0, 0, 255);
range.CharacterFormat.BackgroundColor = Windows.UI.Color.FromArgb(255, 0, 255, 0);
ITextRange
の内側のテキストの色を変更するにはどうすればよいですRichEditBox
か?