开发者

WPF Button to scroll Textbox

I have a RichTextBox and a button. Is ther开发者_开发技巧e any easy way to make the textbox scroll down / up when i press the button? my guess is i have to use commands but im not 100% sure how commands work.


There is VerticalOffset property and ScrollToVerticalOffset method you can use:

richTB.ScrollToVerticalOffset(richTB.VerticalOffset - 15);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜