我用几个Grids来格式化多个GridViewColumn.CellTemplates:
<ListView SharedSizeScope="true">
<ListView.View>
<GridView>
<GridViewColumn>
<GridViewColumn.CellTemplate>
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition SharedSizeGroup="foo" />
<!-- ... -->
Run Code Online (Sandbox Code Playgroud)
我试图将RowDefinitions(对于所有列都相同)提取到Style:
<Style TargetType="{x:Type Grid}">
<Setter Property="RowDefinitions">
<Setter.Value>
<RowDefinition SharedSizeGroup="foo" />
<!-- ... -->
Run Code Online (Sandbox Code Playgroud)
但编译器抱怨:
错误:无法设置Property Setter'RowDefinitions',因为它没有可访问的set访问器.
这有点明显,但不是很有帮助.
| 归档时间: |
|
| 查看次数: |
11433 次 |
| 最近记录: |