user1146887
user1146887

Reputation:

Edit individual character or word in RichEditBox?

enter image description here

Basically in RichEditBox you can paste text and it can automatically format that pasted text according to what you copied. I am wondering how to set a specific part of the document, such as a word, or sentence, to a specific form of font colour, or font style, or any other properties regarding text.

I cannot find any real documentation on how to do such a thing.

EDIT:

I found:

 richEditBox.Document.GetRange(3, 10).CharacterFormat.ForegroundColor = Windows.UI.Colors.Blue;

If someone knows something nicer, post please.

Upvotes: 0

Views: 594

Answers (2)

user1146887
user1146887

Reputation:

Simply use

richEditBox.Document.GetRange(3, 10).CharacterFormat.ForegroundColor = Windows.UI.Colors.Blue;

Upvotes: 1

Marcus
Marcus

Reputation: 8659

Are you looking for something like this?

http://msdn.microsoft.com/en-us/library/0dhsw8eb(v=vs.90).aspx

Upvotes: 0

Related Questions