WP7 行跨度全部
我正在寻找一个将作为一般覆盖的边框。我尝试使用不透明度为 0.75 的 800x480 边框作为叠加层。但是,它仅填充其所在行的内容,而不是整个页面。如果我知道它需要覆盖多少行,我可以设置行跨度,它将覆盖整个屏幕。我想知道是否有一种方法可以将其设置为覆盖所有行,而不知道有多少行。或者是否有更好的方法来完成同样的事情。到目前为止,我想出的唯一解决方案是将行跨度设置为一个我知道我不会有的大数字(例如 50)。
I'm looking to make a border that will serve as a general overlay. I'm trying to use an 800x480 border with opacity .75 as the overlay. However, it only fills the content of the row it's in, not the entire page. If I know how many rows it needs to cover, I can set the rowspan and it will cover the entire screen. I was wondering if there is a way to set it to cover all rows, without knowing how many. Or if there's a better way to accomplish the same thing. The only solution I've come up with so far is to set the rowspan to a big number that I know I won't have (such as 50).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果不设置 Grid.Row,则边框将跨越所有行。请注意,高度必须设置为“自动”,“垂直对齐”必须设置为拉伸。
示例:
边框位于右列并跨越两行。
If you don't set Grid.Row then the border will span all rows. Please notice that Height must be set to 'Auto' and 'VerticalAlignment' to Stretch.
Example:
The border will be in the right column and span both rows.
你是对的。分配一个大于最大行数的任意大的 Grid.RowSpan。 99 似乎可以接受,因为网格中的这么多行可能会出现性能问题。
You are correct. Assign an arbitrarily large Grid.RowSpan that is greater than the max number of rows. 99 seems acceptable, as you will have likely have performance issues with that many rows in a grid.