protected override void OnPointerMoved(PointerEventArgs e)
{
if (TextView != null) // Need to check this incase control was virtualized?
{
var point = e.GetPosition(TextView.TextSurface);
if (e.Device.Captured == TextView)
{
var currentMouseOffset = TextView.GetOffsetFromPoint(point);
if (currentMouseOffset != -1)
{
CaretIndex = currentMouseOffset;
if (CaretIndex >= 0)
{
SelectionEnd = CaretIndex;
}
else
{
SelectionEnd = 0;
}
}
}
}
}