title: Dynamic menus with Caliburn micro
body: <p>I use Caliburn micro for my WPF Project. Static menus are easy to bind with Caliburn</p>
  
  <pre><code>&lt;Menu Grid.Row="0" IsMainMenu="True"&gt;
      &lt;MenuItem Header="_File"&gt;
          &lt;MenuItem x:Name="OpenScript" Header="_Open script"/&gt;
      &lt;/MenuItem&gt;
      &lt;MenuItem Header="_Script"&gt;
          &lt;MenuItem x:Name="RunScript" Header="_Run script" /&gt;
          &lt;MenuItem x:Name="StopScript" Header="_Stop script" /&gt;
      &lt;/MenuItem&gt;
      &lt;MenuItem Header="S_ettings"&gt;
          &lt;MenuItem x:Name="Plugins" Header="_Plugins"&gt;...Clickable children here&lt;/MenuItem&gt;
      &lt;/MenuItem&gt;
  &lt;/Menu&gt;  
  </code></pre>
  
  <p>The names are bound to methods on the model, but for the Plugins menu that you see above we need to bind against a collection of PluginViewModel.. Then when you click a plugin i want a Caliburn action method to trigger on the menu view model (You now the kind that you can yield reuturn IResults from).. Is this possible?</p>
  
  <p>This question is for this open source project
  <a href="https://github.com/AndersMalmgren/FreePIE" rel="nofollow noreferrer">https://github.com/AndersMalmgren/FreePIE</a></p>
  
  <p>edit: Forgot to mentioned that i have solved the binding part,</p>
  
  <pre><code>public BindableCollection&lt;PluginMenuViewModel&gt; Plugins { get; set; }
  </code></pre>
  
  <p>But i do not know how to listen to the click from the model</p>