I am having a problem trying to call a View Model method from within a data template, more specifically within a nested MenuItem.
I have a listbox with templated items. The Item template needs to contain a menu and that menu needs to have a menu item which takes the user to the item details.
I have the following Xaml.
<MenuItem Header="options" x:Name="MnuOptions">
<MenuItem Micro:Message.Attach="Details($dataContext)" Header="Details"/>
<Button Content="Details" Micro:Message.Attach="Details($dataContext)"/>
When I click the "Details" menu item I get the exception "No target found from the method Details". However, I added a button with the same Message.Attach value and this calls the view model passing the Item when clicked!?! If a
button works and a sub menuItem does not then surely this a bug
A simple repro sample can be found on my skydrive;
Any assistance would be appreciated.