Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有RichTextBlock一个ScrollViewer。内容RichTextBlock很长。如何RichTextBlock在代码隐藏中滚动到指定的偏移量(的偏移量)?
RichTextBlock
ScrollViewer
ScrollViewer没有 Setter 属性VerticalOffset- 但是它提供了一个公共方法来满足您的要求。
VerticalOffset
_ScrollViewer.SetVerticalOffset(40.0);
干杯!