Horizontal Alignment Property is used to align controls horizontally. It has 4 options.
1. Left
2. Center
3. Right
4. Stretch
Like above, Vertical Alignment Property is used to align controls vertically. It also has 4 options.
1. Top
2. Center
3. Bottom
4. Stretch
Margin property used to specify the distance for the control from Left, Top, Right, Bottom corners. The above properties are very important in placing controls in a WPF window.
I'll explain this with small example. Consider a button inside the window.
<Button Content="Button" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="150,140,150,140"/>
Here, HorizontalAlignment is set to Stretch, it means, the button will be stretched to fit when the window is resized. This is same for VerticalAlignment property.
Margin: Left = 150, Top = 140, Right = 150, Bottom = 140 - these margin values placing the button 140 pixel distance from Top and Bottom, also places the button 150 pixel distance from Left and Right.
Now if your resizes the screen, the button will be placed according to the margin, and the button wil be stretched to fit the window.