简体   繁体   中英

When does ScrollViewer.ChangeView fail?

ScrollViewer.ChangeView doesn't always work. When it doesn't - it returns false ( MSDN ).

What are the conditions for that happening?

EDIT

Most methods either work or throw an exception. This one has a return value. This means there are conditions where it fails (and returns false ). What are those conditions?

EDIT 2 (after awarding the bounty)

I awarded the bounty so as not to waste the reputation points. I'm still looking for THE answer. (Also, the answer was written before my edit to the question.)

The return value of ScrollViewer.ChangeView signals whether the view changes ( true ) or not ( false ) .

The most obvious reason why the view may not change after a ChangeView call is because it was already displaying the requested horizontal and/or vertical offsets and/or zoom factor before the call.

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