silverlight 中的垂直滚动

发布于 2024-08-25 13:22:19 字数 190 浏览 4 评论 0原文

我有一个 silverlight 应用程序,设置为使用 100% 浏览器高度。

当我动态地将控件添加到画布(可以拖动)时,我希望垂直扩展画布。

理想情况下,显示浏览器滚动条,以便用户可以向上或向下移动,如果无法做到这一点,请使用滚动条控件。我还需要处理用户更改浏览器大小的情况。关于如何做到这一点有什么建议吗?

干杯,

I have a silverlight application that is set to use 100% browser height.

As I dynamically add controls to a canvas (which can be dragged around), I would like the expand the canvas vertically.

Ideally show the browser scrollbar so the user can move up or down, if that can't be done, use the scrollbar control. I would also need to handle the user changing the size of the browser. Any suggestions on how to do this ?

Cheers,

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

樱娆 2024-09-01 13:22:19

只需将 Canvas 包裹在 ScrollViewer 中,如下所示:

<ScrollViewer>
    <Canvas>
        ...
    </Canvas>
</ScrollViewer>

Jim McCurdy
面对面软件和 YinYangMoney

Just wrap your Canvas inside of a ScrollViewer as follows:

<ScrollViewer>
    <Canvas>
        ...
    </Canvas>
</ScrollViewer>

Jim McCurdy
Face to Face Software and YinYangMoney

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文