网格中的 (X,Y)

发布于 2024-10-01 19:46:16 字数 66 浏览 0 评论 0原文

是否有一个技巧可以帮助我使用 X,Y 坐标显示网格内的组件?

预先感谢米卢德

·贝尔。

Isn't there a trick that may help me show a component inside a grid by using X,Y coordinates ?

Thanks in advance

Miloud Bel.

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

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

发布评论

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

评论(1

无名指的心愿 2024-10-08 19:46:16

您可以将画布放置在网格内,然后使用 x,y 坐标在画布内设置控件。

然而,尽管这是可行的,但是不是控制布局的好方法。

我建议为网格创建行和列,并通过为控件分配网格行和网格列来将控件放置在网格单元格内。

通常每页一个网格就足够了,这是默认可用的布局网格,您只需根据需要添加行和列即可。

如果您的布局非常简单,则可以仅使用堆栈面板。

以下是 3 个(画布、堆栈面板、网格)的概述:

You can place a canvas inside a grid and then set controls inside the canvas with x,y coordinates.

This however, although doable, is not a good way for control layout.

I would recommend creating rows and columns for the grid, and placing the controls inside the grid cells by assigning a grid row and grid column to the control.

Usualy one grid is enough per page, which is the layout grid available by default, you just have to add rows and columns according to your needs.

If you have a very simple layout, you can just use a stack panel.

Here is an overview of the 3 (canvas, stack panel, grid): http://weblogs.asp.net/scottgu/pages/silverlight-tutorial-part-2-using-layout-management.aspx

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