控制滚动查看器的滚动距离
我在滚动查看器中放置了 20 个文本块,但它最多滚动到 7 个?我还想在应用程序启动时控制滚动距离?
I'm placing 20 textblocks in scroll viewer, but it scrolling upto 7? I also want to control the scroll distance in get scrolled whenever my application starts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能您将
ScrollViewer
的Height
设置为Auto
,但它不适合屏幕。将其设置为Parent
Height
。我希望它能发挥作用。Probably, you set
Height
ofScrollViewer
toAuto
and it don't fit to screen. Set it toParent
Height
. I hope it will work than.你能把你的代码贴出来吗?另请确保您已完成这两件事
1) 将其放入 grid.row 并将 grid.rwo 高度设置为 *
2)不要将滚动查看器放在堆栈面板中
Can you put up your code? Also make sure you have done these two things
1) Place it in a grid.row and set grid.rwo height to *
2) Do not place the scrollviewer in a stackpanel