I'm building a clinical report writer (emits docx format document) that has a set of special tokens that begin with "[!" and end with "!]". When the user changes the selection I need to get notification of the event. If the selection is inside one of these tokens, show a special editor (modeless) to customize runtime text substitutions. How can I setup to get that notification? I already tried Left mouse down and it does not even get called..
private void radRichTextBox1_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
if (radRichTextBox1.Document != null && radRichTextBox1.Document.Selection != null)
{
DocumentSelection selection = radRichTextBox1.Document.Selection;
string selectedText = selection.GetSelectedText();
}
}