title: C# WPF MenuStrip Controller
body: <p>I'm Trying to make a MenuBar using WPF in C# by creating a WindowsFormsHost and add a MenuStrip as its child. Note that I add the menu and menu items using the property page of the WindowsFormsHost Controller.</p>
  
  <p>when I am finished, the project builds and runs successfully, yet it shows some errors in the generated "xaml" file and the designer doesn't load the design.</p>
  
  <p>Here's the generated XAML code</p>
  
  <pre><code>&lt;Window
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:Forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" x:Class="FrontEnd.AppMainWindow"
      Title="AppMainWindow" Height="351" Width="826"&gt;
  &lt;Grid&gt;
      &lt;WindowsFormsHost x:Name="menuStripHost" HorizontalAlignment="Left" Height="23" VerticalAlignment="Top" Width="818"&gt;
          &lt;Forms:MenuStrip Visible="True" Name="appMainMenu"&gt;
              &lt;Forms:MenuStrip.Items&gt;
                  &lt;Forms:ToolStripMenuItem Text="File"&gt;
                      &lt;Forms:ToolStripMenuItem.DropDownItems&gt;
                          &lt;Forms:ToolStripMenuItem ShortcutKeys="Ctrl+N" Text="New Project"/&gt;
                          &lt;Forms:ToolStripMenuItem ShortcutKeys="Ctrl+O" Text="Open Project"/&gt;
                          &lt;Forms:ToolStripMenuItem Text="Exit"/&gt;
                      &lt;/Forms:ToolStripMenuItem.DropDownItems&gt;
                  &lt;/Forms:ToolStripMenuItem&gt;
                  &lt;Forms:ToolStripMenuItem Text="View"&gt;
                      &lt;Forms:ToolStripMenuItem.DropDownItems&gt;
                          &lt;Forms:ToolStripMenuItem Text="Configuration Window"/&gt;
                      &lt;/Forms:ToolStripMenuItem.DropDownItems&gt;
                  &lt;/Forms:ToolStripMenuItem&gt;
                  &lt;Forms:ToolStripMenuItem Text="Help"&gt;
                      &lt;Forms:ToolStripMenuItem.DropDownItems&gt;
                          &lt;Forms:ToolStripMenuItem Text="User Manual"/&gt;
                          &lt;Forms:ToolStripMenuItem Text="Help"/&gt;
                      &lt;/Forms:ToolStripMenuItem.DropDownItems&gt;
                  &lt;/Forms:ToolStripMenuItem&gt;
              &lt;/Forms:MenuStrip.Items&gt;
          &lt;/Forms:MenuStrip&gt;
      &lt;/WindowsFormsHost&gt;
  
  &lt;/Grid&gt;&lt;/Window&gt;
  </code></pre>
  
  <p>and here's the errors</p>
  
  <blockquote>
    <p>Error 2   The specified value cannot be assigned to the collection. The following type was expected: "String".</p>
  </blockquote>
  
  <p>The same error appears for all lines that have the TAG "Forms:ToolStripMenuItem"</p>
  
  <p><strong>UPDATE:</strong>
  tried to remove the ShortcutKeys property and the problem still exists (the same error as the above).
  Here's the code after modification...</p>
  
  <pre><code>&lt;Window
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:Forms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" x:Class="FrontEnd.AppMainWindow"
      Title="AppMainWindow" Height="351" Width="826"&gt;
  &lt;Grid&gt;
      &lt;WindowsFormsHost x:Name="menuStripHost" HorizontalAlignment="Left" Height="23" VerticalAlignment="Top" Width="818"&gt;
          &lt;Forms:MenuStrip Visible="True" Name="appMainMenu"&gt;
              &lt;Forms:MenuStrip.Items&gt;
                  &lt;Forms:ToolStripMenuItem Text="File"&gt;
                      &lt;Forms:ToolStripMenuItem.DropDownItems&gt;
                          &lt;Forms:ToolStripMenuItem Text="New Project"/&gt;
                          &lt;Forms:ToolStripMenuItem Text="Open Project"/&gt;
                          &lt;Forms:ToolStripMenuItem Text="Exit"/&gt;
                      &lt;/Forms:ToolStripMenuItem.DropDownItems&gt;
                  &lt;/Forms:ToolStripMenuItem&gt;
                  &lt;Forms:ToolStripMenuItem Text="View"&gt;
                      &lt;Forms:ToolStripMenuItem.DropDownItems&gt;
                          &lt;Forms:ToolStripMenuItem Text="Configuration Window"/&gt;
                      &lt;/Forms:ToolStripMenuItem.DropDownItems&gt;
                  &lt;/Forms:ToolStripMenuItem&gt;
                  &lt;Forms:ToolStripMenuItem Text="Help"&gt;
                      &lt;Forms:ToolStripMenuItem.DropDownItems&gt;
                          &lt;Forms:ToolStripMenuItem Text="User Manual"/&gt;
                          &lt;Forms:ToolStripMenuItem Text="Help"/&gt;
                      &lt;/Forms:ToolStripMenuItem.DropDownItems&gt;
                  &lt;/Forms:ToolStripMenuItem&gt;
              &lt;/Forms:MenuStrip.Items&gt;
          &lt;/Forms:MenuStrip&gt;
      &lt;/WindowsFormsHost&gt;
  
  &lt;/Grid&gt;&lt;/Window&gt;
  </code></pre>