简体   繁体   中英

Auto scrolling ScrollViewer in WPF/Visual C#

I know this question has been asked many times before, I just want to say, I have tried doing my research however my issue is that I am completely new to C# and am not able to understand the solutions presented because they are presented not for people as new as me.

Is there any simple or even moderately complicated way for someone to create a ScrollViewer in XAML that keeps scrolled to the bottom when it's content is edited, ie if an element is added to it.

Thanks a lot!

Edit: I've looked at http://msdn.microsoft.com/en-us/library/system.windows.controls.scrollviewer.linedown.aspx but I'm not sure how this will be called automatically or if the content's height that is added is over a line long, how this function will keep the ScrollViewer scrolled down.

Have you tried :

ScrollViewer.ScrollToBottom()

I mean whenever you are adding or editing an item, you can call it at the end.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM