To reproduce:
- Place RadRichTextBox in a blank form.
- Set its ReadOnly property to true.
- Copy some text and then press Ctrl+V in the RadRichTextBox.
Workaround:
- Use the following InputBehaviour:
class MyInputBeaviour : InputBehavior
{
public MyInputBeaviour(DocumentView view)
: base(view)
{
}
protected override void PerformPasteOperation(KeyEventArgs e)
{
if (!this.DocumentView.IsReadOnly)
{
base.PerformPasteOperation(e);
}
}
}
- You can change the default behaviour like this:
radRichTextBox1.RichTextBoxElement.ViewElement.DocumentView.InputBehavior = new MyInputBeaviour(radRichTextBox1.DocumentView);