Разве вы не можете просто использовать сетку 8x8?Восемь RowDefinitions
и Восемь ColumnDefinitions
должны его получить.
Вот очень грубый метод для этого.Пока высота и ширина сетки делают ее квадратной, результирующие элементы будут иметь соответствующие пропорции.Вы также можете установить Высота каждого RowDefinition и Ширина каждого ColumnDefinition на одно и то же произвольное значение и получить его пропорциональным.XAML, но я оставляю за тобой выбор.
<Grid x:Name="LayoutRoot" Background="White" Width="400" Height="400" >
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Background="Black" Grid.Row="0" Grid.Column="0"/>
<Border Background="Ivory" Grid.Row="0" Grid.Column="1"/>
<Border Background="Black" Grid.Row="0" Grid.Column="2"/>
<Border Background="Ivory" Grid.Row="0" Grid.Column="3"/>
<Border Background="Black" Grid.Row="0" Grid.Column="4"/>
<Border Background="Ivory" Grid.Row="0" Grid.Column="5"/>
<Border Background="Black" Grid.Row="0" Grid.Column="6"/>
<Border Background="Ivory" Grid.Row="0" Grid.Column="7"/>
<Border Background="Black" Grid.Row="2" Grid.Column="0"/>
<Border Background="Ivory" Grid.Row="2" Grid.Column="1"/>
<Border Background="Black" Grid.Row="2" Grid.Column="2"/>
<Border Background="Ivory" Grid.Row="2" Grid.Column="3"/>
<Border Background="Black" Grid.Row="2" Grid.Column="4"/>
<Border Background="Ivory" Grid.Row="2" Grid.Column="5"/>
<Border Background="Black" Grid.Row="2" Grid.Column="6"/>
<Border Background="Ivory" Grid.Row="2" Grid.Column="7"/>
<Border Background="Black" Grid.Row="4" Grid.Column="0"/>
<Border Background="Ivory" Grid.Row="4" Grid.Column="1"/>
<Border Background="Black" Grid.Row="4" Grid.Column="2"/>
<Border Background="Ivory" Grid.Row="4" Grid.Column="3"/>
<Border Background="Black" Grid.Row="4" Grid.Column="4"/>
<Border Background="Ivory" Grid.Row="4" Grid.Column="5"/>
<Border Background="Black" Grid.Row="4" Grid.Column="6"/>
<Border Background="Ivory" Grid.Row="4" Grid.Column="7"/>
<Border Background="Black" Grid.Row="6" Grid.Column="0"/>
<Border Background="Ivory" Grid.Row="6" Grid.Column="1"/>
<Border Background="Black" Grid.Row="6" Grid.Column="2"/>
<Border Background="Ivory" Grid.Row="6" Grid.Column="3"/>
<Border Background="Black" Grid.Row="6" Grid.Column="4"/>
<Border Background="Ivory" Grid.Row="6" Grid.Column="5"/>
<Border Background="Black" Grid.Row="6" Grid.Column="6"/>
<Border Background="Ivory" Grid.Row="6" Grid.Column="7"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="0"/>
<Border Background="Black" Grid.Row="1" Grid.Column="1"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="2"/>
<Border Background="Black" Grid.Row="1" Grid.Column="3"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="4"/>
<Border Background="Black" Grid.Row="1" Grid.Column="5"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="6"/>
<Border Background="Black" Grid.Row="1" Grid.Column="7"/>
<Border Background="Ivory" Grid.Row="3" Grid.Column="0"/>
<Border Background="Black" Grid.Row="3" Grid.Column="1"/>
<Border Background="Ivory" Grid.Row="3" Grid.Column="2"/>
<Border Background="Black" Grid.Row="3" Grid.Column="3"/>
<Border Background="Ivory" Grid.Row="3" Grid.Column="4"/>
<Border Background="Black" Grid.Row="3" Grid.Column="5"/>
<Border Background="Ivory" Grid.Row="3" Grid.Column="6"/>
<Border Background="Black" Grid.Row="3" Grid.Column="7"/>
<Border Background="Ivory" Grid.Row="5" Grid.Column="0"/>
<Border Background="Black" Grid.Row="5" Grid.Column="1"/>
<Border Background="Ivory" Grid.Row="5" Grid.Column="2"/>
<Border Background="Black" Grid.Row="5" Grid.Column="3"/>
<Border Background="Ivory" Grid.Row="5" Grid.Column="4"/>
<Border Background="Black" Grid.Row="5" Grid.Column="5"/>
<Border Background="Ivory" Grid.Row="5" Grid.Column="6"/>
<Border Background="Black" Grid.Row="5" Grid.Column="7"/>
<Border Background="Ivory" Grid.Row="7" Grid.Column="0"/>
<Border Background="Black" Grid.Row="7" Grid.Column="1"/>
<Border Background="Ivory" Grid.Row="7" Grid.Column="2"/>
<Border Background="Black" Grid.Row="7" Grid.Column="3"/>
<Border Background="Ivory" Grid.Row="7" Grid.Column="4"/>
<Border Background="Black" Grid.Row="7" Grid.Column="5"/>
<Border Background="Ivory" Grid.Row="7" Grid.Column="6"/>
<Border Background="Black" Grid.Row="7" Grid.Column="7"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="0"/>
<Border Background="Black" Grid.Row="1" Grid.Column="1"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="2"/>
<Border Background="Black" Grid.Row="1" Grid.Column="3"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="4"/>
<Border Background="Black" Grid.Row="1" Grid.Column="5"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="6"/>
<Border Background="Black" Grid.Row="1" Grid.Column="7"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="0"/>
<Border Background="Black" Grid.Row="1" Grid.Column="1"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="2"/>
<Border Background="Black" Grid.Row="1" Grid.Column="3"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="4"/>
<Border Background="Black" Grid.Row="1" Grid.Column="5"/>
<Border Background="Ivory" Grid.Row="1" Grid.Column="6"/>
<Border Background="Black" Grid.Row="1" Grid.Column="7"/>
</Grid>