I am using RadRichTextBox with 3 basic style definitions only. I dont want allow users to use more, this is requirement. I achieved the expected behavior except one situation, pasting content that contains styles from MS Word. I would like to not load Style Definitions from pasted content to RadRichTextBox. My idea was to reload my 3 basic style definitions after paste command executed, because then StyleRepository contains more of them:
sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutedEventArgs e)
var styl1 =
var styl2 =
var styl3 =
and this works almost ok. When saving this and opening again text is not styled.
But right after paste, after removing this additional styles from pasted content, the pasted content still looks like it has this Style Definitions applied.
Document doesn't have style definitions in collection and RadRichTextBox still shows styled content.
Is it problem with refreshing RadRichTextBox after manual operations on StyleRepository?