title: How to disable contextmenu item?
body: <p>In WPF I have this code for disabling a menuitem on a certain condition:</p>
  
  <pre><code>private void gridListPlayers_ContextMenuOpening(object sender, ContextMenuEventArgs e)
  {
      Player player = (Player)gridListPlayers.SelectedItem;
  
      if(player.Owner.GUID == Guid.Empty.ToString())
      {
          propMenuItem.IsEnabled = false;
      }
      else
      {
          propMenuItem.IsEnabled = true;
      }
  }
  </code></pre>
  
  <p>I'm trying to achieve the same result of that function via XAML. Is there a simple way to do that?</p>