【发布时间】:2010-12-01 19:06:51
【问题描述】:
有没有办法在特定列中组合行?因此得到这样的东西(我目前在控件上使用行跨度,即图像,但有更好的方法吗?)
--------------------
| |--------|
| |--------|
| |--------|
| |--------|
| |--------|
--------------------
我基本上都在用这段代码
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="*" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="124" />
<ColumnDefinition Width="246*" />
</Grid.ColumnDefinitions>
这给了我这样的东西(注意行也出现在第 0 列)
--------------------
|---------|--------|
|---------|--------|
|---------|--------|
|---------|--------|
|---------|--------|
--------------------
现在我可以解决这个问题,例如,如果我想放置一个可以使用 RowSpan 的图像,但是否不可能设计一个没有行的列而其他列有行?
【问题讨论】:
标签: wpf gridview layout wpf-controls