title: Caliburn.Micro: Call method of property on DataContext
body: <p>I have a MainView whose DataContext is my MainViewModel.</p>
  
  <p>MainViewModel:</p>
  
  <pre><code>class MainViewModel : PropertyChangedBase
  {
      #region Properties
  
      /// &lt;summary&gt;
      /// The ProjectViewModel.
      /// &lt;/summary&gt;
      public ProjectViewModel ProjectVM
      {
          get { return _projectVM; }
          private set
          {
              _projectVM = value;
              NotifyOfPropertyChange(() =&gt; ProjectVM);
          }
      }
      private ProjectViewModel _projectVM;
  
      #endregion
  
      /// &lt;summary&gt;
      /// Constructor.
      /// &lt;/summary&gt;
      public MainViewModel()
      {
          ProjectVM = new ProjectViewModel();
      }
  }
  </code></pre>
  
  <p>Now, I have a Menu on my MainView. I want to bind the Click event of the MenItems to methods on the ProjectVM object. of course I know I can just set the DataContext of the MenuItems, but I was wondering if there is a simpler way.</p>
  
  <p>Currently my MainView looks like this:</p>
  
  <pre><code>  &lt;Grid&gt;
  &lt;Grid.RowDefinitions&gt;
    &lt;RowDefinition Height="Auto"/&gt;
  &lt;/Grid.RowDefinitions&gt;
  
  &lt;Menu Grid.Row="0"&gt;
    &lt;MenuItem Header="File"&gt;
      &lt;MenuItem Header="New Project..."&gt;
        &lt;i:Interaction.Triggers&gt;
          &lt;i:EventTrigger EventName="Click"&gt;
            &lt;cal:ActionMessage MethodName="ProjectVM.ShowNewProjectDialog"/&gt;
          &lt;/i:EventTrigger&gt;
        &lt;/i:Interaction.Triggers&gt;
      &lt;/MenuItem&gt;
      &lt;MenuItem Header="Load Project..."/&gt;
      &lt;MenuItem Header="Close Project..."/&gt;
    &lt;/MenuItem&gt;
  &lt;/Menu&gt;
  </code></pre>
  
  <p></p>
  
  <p>I had hopes Caliburn was smart enough to resolve ProjectVM.ShowNewProjectDialog, but it isn't. Is there any good way to do this without having to set the DataContext of the Menu manually?</p>