WPF ScrollToTop vs ScrollToHome

Viewed 222

I was wondering what's the actual difference between ScrollViewer.ScrollToHome() and ScrollViewer.ScrollToTop(). Are they the same?

The documentation for both says:

Scrolls vertically to the beginning of the ScrollViewer content.

I think it is very unusual to have two methods in the .NET Framework with different names, doing the same. Is it?

1 Answers

Remember that ScrollViewer's can scroll both horizontally and vertically.

ScrollToTop - assumes that the ScrollViewer is vertical and goes to the beginning

ScrollToLeft - assumes that the ScrollViewer is horizontal and goes to the beginning

ScrollToHome - assumes neither and scrolls to the Top Left

Related