Вы можете сравнить CaretPosition
с текущим Selection
, чтобы определить, в каком направлении был выбран текст:
TextPointer caretPos = richTextBox.CaretPosition;
TextPointer selectStart = richTextBox.Selection.Start;
TextPointer selectEnd = richTextBox.Selection.End;
if(caretPos.CompareTo(selectStart) == 0)
{
//The text was selected from right to left.
}
else if(caretPos.CompareTo(selectEnd) == 0)
{
//The text was selected from left to right.
}