I’m trying to do something like this…
<Style
x:Key="TwoByTwoGridStyle"
TargetType="Grid">
<Setter
Property="Grid.RowDefinitions">
<Setter.Value>
<ControlTemplate>
<RowDefinition
Height="*" />
<RowDefinition
Height="Auto" />
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter
Property="Grid.ColumnDefinitions">
<Setter.Value>
<ControlTemplate>
<ColumnDefinition
Width="*" />
<ColumnDefinition
Width="Auto" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
ControlTemplate is not right. I get the error: “Property VisualTree does not support values of type RowDefinition“. Is there some way to signify a collection of row/column definitions? Or, is there some other way to create a style/template for a 2×2 Grid?
Thanks.
I’m pretty sure now that the answer is: “can’t be done”. Please correct me if I’m wrong.