[英]When does ScrollViewer.ChangeView fail?
ScrollViewer.ChangeView
doesn't always work. ScrollViewer.ChangeView
并不总是有效。 When it doesn't - it returns false
( MSDN ). 如果不是,则返回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
). 这意味着在某些情况下它会失败(并返回false
)。 What are those conditions? 这些条件是什么?
EDIT 2 (after awarding the bounty) 编辑2(奖励之后)
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
) . ScrollViewer.ChangeView
的返回值指示视图是否更改( true
)或不更改( 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. 视图在ChangeView
调用后可能不会更改的最明显的原因是,视图在调用前已经显示了所请求的水平和/或垂直偏移和/或缩放系数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.