本文介绍了ScrollViewer和ScrollToHorizo​​ntalOffset问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ScrollViewer中有一个StackPanel。 我正在尝试将滚动位置设置为堆栈中的项目。 我在NavigateToEvent上执行此代码。 这在页面加载时工作正常,但它似乎发现了
ScrollViewer的问题。 如果我没有设置ScrollToHorizo​​ntalOffset,那么一切都很好。 但是,如果我设置了ScrollToHorizo​​ntalOffset,则ScrollViewer将不再再水平滚动。

I have a StackPanel inside a ScrollViewer.  I am trying to set a scroll position to an item in the stack.  I am doing this code on the NavigateToEvent.  This works fine when the page loads, yet it seems to have uncovered a problem with the ScrollViewer.  If I do not set the ScrollToHorizontalOffset, all if fine.  However, if I set the ScrollToHorizontalOffset, the ScrollViewer will not longer scroll horizontally anymore.

FierceMuppet

FierceMuppet

推荐答案

您是如何将滚动位置设置为堆栈中的项目的?你能告诉我一些代码吗?

How did you set the scroll position to an item in the stack? Could you please show me some code?


这篇关于ScrollViewer和ScrollToHorizo​​ntalOffset问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 22:50