I am working in WPF. I want to show current caretposition in viewport top. I already tried the BringIntoView()
Method. It works, but it only working moved to hide part.
FrameworkContentElement fce = (mycaret.Parent as FrameworkContentElement);
if (fce != null)
{
fce.BringIntoView();
}
I got an other method in this below code.
System.Windows.Rect rc = currentline.GetCharacterRect(LogicalDirection.Forward);
rtb.ScrollToVerticalOffset(rc.Bottom + rtb.VerticalOffset - txtAppendValue.ViewportHeight);
It gives bottom up panning. So how can I get top down panning through this way?