WPF单行TextBox自动滚动至末尾
根据光标位置自动滚动
textBox.CaretIndex = textBox.SelectionStart; var rect = textBox.GetRectFromCharacterIndex(textBox.CaretIndex); textBox.ScrollToHorizontalOffset(rect.Right);