title: WPF contextmenu binding
body: <p>Cant seem to bind a menuitem in my contextmenu to a command in my viewmodel. I know the contextmenu does not live in the visual tree. For testing purposes i have bound to the same command twice in a button. The first binding works but i can get the second binding in the contextmenu to bind. I can see the binding error in output. Someone has any idea?</p>
  
  <pre><code>&lt;HierarchicalDataTemplate DataType="{x:Type inf:OSiteEquipment}" ItemsSource="{Binding Path=SubSystems, Converter={StaticResource subsystemConverter}}"  &gt;
                  &lt;Button HorizontalContentAlignment="Left"
                          Command="{Binding DataContext.CommandOpenSelected, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}"
                          CommandParameter="{Binding}"&gt;
  
                      &lt;TextBlock Text="{Binding Path=PartData.Name}" TextTrimming="CharacterEllipsis" /&gt;
                      &lt;Button.ContextMenu&gt;
                          &lt;ContextMenu&gt;                                                                         
  
       &lt;MenuItem Header="Add Category"  Command="{Binding Path=Parent.PlacementTarget.Tag.CommandOpenSelected, RelativeSource={RelativeSource AncestorType=ContextMenu}}" /&gt;
                          &lt;/ContextMenu&gt;
  
                      &lt;/Button.ContextMenu&gt;
                  &lt;/Button&gt;
              &lt;/HierarchicalDataTemplate&gt;
  </code></pre>