Reputation: 3164
The WinRT
RichEditBox
ForegroundColor
is Black
by default.
How do I change this to a custom color?
This is what I tried...
// Set default ForegroundColor
ITextCharacterFormat defaultCharacterFormat =
redBody.Document.GetDefaultCharacterFormat();
defaultCharacterFormat.ForegroundColor = Colors.Blue;
redBody.Document.SetDefaultCharacterFormat(defaultCharacterFormat);
redBody.Document.ApplyDisplayUpdates();
Any ideas on how to get this to work?
Upvotes: 0
Views: 252
Reputation: 1967
If you are using a XAML RichEditBox, then the Foreground property should work for you, e.g. <RichEditBox Foreground="Violet" />
.
Upvotes: 1