在 C# 中如何跨列?
在 C# 中如何跨列? 在 silverlight 中,假设您有一个网格,并且该网格分为 3 列。 并且您想要将 UserControl 添加到此网格,但您希望它跨越所有三个 列。该 C# 代码会是什么样子?
Grid1.Children.Add(UserControl01);
但然后呢?
Grid1.Children.ElementAt(1).SetValue(Grid.SetRowSpan, 2);
??
How do you span columns in C#?
In silverlight, suppose you have a grid, and this grid is in 3 columns.
and you want to add a UserControl to this grid but you want it to span all three
columns. How would that C# code look like?
Grid1.Children.Add(UserControl01);
But then what?
Grid1.Children.ElementAt(1).SetValue(Grid.SetRowSpan, 2);
??
我想你想要这样的东西:
MSDN文档: http://msdn.microsoft.com/en-us/library/system.windows.controls.grid.setcolumnspan.aspx
I think you want something like this:
MSDN Docs: http://msdn.microsoft.com/en-us/library/system.windows.controls.grid.setcolumnspan.aspx