I would recommend 2 things:
First, use some loops in your code-behind to generate all your rectangles. You have about 64 of them hard-coded. Code behind could really reduce the size of that XAML file.
XAML:
<UniformGrid x:Name="_uniformGrid" Rows="8" Columns="8"/>
CodeBehind: (a little complicated because the rows alter white/black, but the code below works...)
private void InitializeUniformGrid()
{
for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
_uniformGrid.Children.Add(new Rectangle { Fill = Brushes.Black, Stroke = Brushes.Black });
_uniformGrid.Children.Add(new Rectangle { Fill = Brushes.White, Stroke = Brushes.Black });
}
for (int k = 0; k < 4; k++)
{
_uniformGrid.Children.Add(new Rectangle { Fill = Brushes.White, Stroke = Brushes.Black });
_uniformGrid.Children.Add(new Rectangle { Fill = Brushes.Black, Stroke = Brushes.Black });
}
}
}
Second, to solve your main problem, you need to specify a Height and Width for your ChessBoardView.
Do this (change the 500 to whatever width and height you really need):
Height="500" Width="500"
The following will only set the height and width while in design view, not when your code is running:
d:DesignHeight="300" d:DesignWidth="300"
Your resulting XAML should look like this:
<UserControl x:Class="Chess_Piece_Viewer.Views.ChessBoardView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Height="300" Width="300"
d:DesignHeight="300" d:DesignWidth="300">