GeneralTransform:“值未落在预期范围内”
我们尝试使用这样的 GeneralTransform:
GeneralTransform gt = this.scrollViewer.TransformToVisual(Application.Current.RootVisual as UIElement);
我们经常(但并非总是)收到“值未落在预期范围内”异常。
为什么会发生这种情况?是否有某种方法可以测试元素以了解 TransformToVisual() 调用是否有效?
感谢您的任何见解...
We are trying to use a GeneralTransform like this:
GeneralTransform gt = this.scrollViewer.TransformToVisual(Application.Current.RootVisual as UIElement);
We often, but not always, get the "Value does not fall withing expected range" exception.
Why does this happen, and is there some way to test the elements to know if the TransformToVisual() call will work?
Thanks for any insight...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只能对屏幕上可见且已布局的元素调用 TransformToVisual。
You can only call TransformToVisual on an element that is visible on the screen and already layed out.