title: Menu control (WPF) issues
body: <p>I want to create a scalable Menu control in my application. I used <a href="https://stackoverflow.com/questions/3193339/tips-on-developing-resolution-independent-application/5000120#5000120">this answer</a> to create a scalable window and then inserted the Menu control into it. I have some issues and cannot find a solution.</p>
  
  <p>How to set the "center" vertical adjustment for the menu items? Now they are docked to the top. Are there any ways to move the first item ("File" in my case) to the right a bit?</p>
  
  <p>And is it possible to avoid cutting of menu panel during window resizing? For now, even if I move the top border of inner grid a bit down, the menu panel is cut by half.</p>
  
  <p>My code and its results for full-screen and smaller scale are below:</p>
  
  <p><a href="https://i.stack.imgur.com/pqQuy.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pqQuy.jpg" alt=""></a></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Window x:Class="DigitalSteelCastingWPF.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:DigitalSteelCastingWPF"
          mc:Ignorable="d"
          Title="Digital Steel Casting"
          Name="myMainWindow"
          Height="1056" Width="1936"
          WindowStartupLocation="CenterScreen" WindowState="Maximized"
          FontSize="24"
          HorizontalAlignment="Center" VerticalAlignment="Center"
          WindowStyle="ThreeDBorderWindow"&gt;
  
      &lt;Grid Name="MainGrid" SizeChanged="MainGrid_SizeChanged"&gt;
  
          &lt;Grid.LayoutTransform&gt;
              &lt;ScaleTransform x:Name="ApplicationScaleTransform"
                          CenterX="0"
                          CenterY="0"
                          ScaleX="{Binding ElementName=myMainWindow, Path=ScaleValue}"
                          ScaleY="{Binding ElementName=myMainWindow, Path=ScaleValue}" /&gt;
          &lt;/Grid.LayoutTransform&gt;
  
          &lt;Grid VerticalAlignment="Center" HorizontalAlignment="Center" Height="1025" Width="1928"&gt;
  
              &lt;StackPanel VerticalAlignment="Top"&gt;
                  &lt;Menu Width="Auto" Height="50" VerticalAlignment="Center" FontSize="24"&gt;
                      &lt;MenuItem Header="_File"&gt;
                          &lt;MenuItem x:Name="New" Header="_New" Height="50" HorizontalAlignment="Left" Width="250"/&gt;
                          &lt;MenuItem x:Name="Open" Header="_Open" Height="50" HorizontalAlignment="Left" Width="250"/&gt;
                          &lt;MenuItem x:Name="Exit" Header="_Exit" Height="50" HorizontalAlignment="Left" Width="250"/&gt;
                      &lt;/MenuItem&gt;
                      &lt;MenuItem Header="_Tools"&gt;
                          &lt;MenuItem x:Name="Options" Header="O_ptions" Height="50" HorizontalAlignment="Left" Width="250"/&gt;
                      &lt;/MenuItem&gt;
                  &lt;/Menu&gt;
              &lt;/StackPanel&gt;
  
          &lt;/Grid&gt;
  
      &lt;/Grid&gt;
  
  &lt;/Window&gt;
  
  </code></pre>