Fix inaccurate text reporting in Visual Studio text controls (#15838)
follow up of #14888
Summary of the issue:
During development of #14888, it was observed that XAML edit fields tend to fire text change events before the caret position is changed, resulting in wrong text reporting. After using Visual Studio, I discovered that the same issue applies to the text controls in Visual Studio, notably WPF.
Description of user facing changes
In Visual Studio, the caret position is no longer sometimes reported inaccurately.
Description of development approach
use a common base class for XAML and WPF editable text.