Допустим, есть грид. Разделен на две строки. В верхнем тоже есть грид, который разделен 3 на 3(создаю игру пятнашки). Нужно в коде, создать 8 кнопок(рандомность как нибудь потом добавим), в каждой ячейке кроме одной. http://prntscr.com/jb9xh5 скрин разметки. и сам код разметки внизу. В общем нужно в c# создать кнопки в нужных ячейках
<Window x:Class="Game_PYATNASHKI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Game_PYATNASHKI"
mc:Ignorable="d"
Title="MainWindow" Height="400" Width="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="3*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" x:Name="Pole">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
</Grid>
</Grid>