<Window x:Class="DemoWPF.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" SizeToContent="WidthAndHeight" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0" Margin="2">Button</Button>
</Grid>
</Window>
After starting I see window:

If I will change size of the window slightly I see next window:

Why is size of the button changes?
This is probably (but arguable) a bug in WPF. You are declaring your grid as having three equal-size rows. The button takes up only one row.
When the resize is fired, WPF squishes your button since it should only be showing in the first row. It should look like this on start-up:
You can fix this by specifying a
MinHeighton your Window: