views:

164

answers:

1

Hi, I was just wondering if there is a way that we disable editing of a specific word in the System.Window.Controls.RichTextBox? For example, I have "Hello This is a test", and I want to disable users to a edit test(which can be anything). I want to them to change whatever they want, but when they want to click or do anything on "test", it's somehow in a different color like gray(which is easy to do), but not editable.

thanks,

A: 

There is no functionality like this built into the RichTextBox. Your best bet is to create a custom control of some type or inherit from the RichTextBox and override methods to add your own functionality.

Charlie
and the tricky part is at they type and change words, you have to keep range of every single word to keep the same decoration and restrictions.
paradisonoir