WPF: Fixed several positioning and margin issues in MainWindow (a few fixes were also part of the last commit).