hi,
Just trying to call a Command from one MenuItem:
XAML:
<Window.CommandBindings><CommandBinding Command="ApplicationCommands.Close" Executed="OnClose"/></Window.CommandBindings><MenuItem Name="Contextual_Salir" Header="Salir" Visibility="Visible" Command="ApplicationCommands.Close"><MenuItem.Icon><Image Source="/Imagenes/Mapa_de_procesos.png" Height="20" Width="20"/></MenuItem.Icon></MenuItem>
code-behind:
Private Sub OnClose(sender As Object, e As ExecutedRoutedEventArgs) Application.Current.Shutdown() End Sub
But the option ("Salir" in this case appears disabled... have not idea why!!
Primary platform is Windows 7 Ultimate 64 bit along with VS 2012/Sql2k8 for WPF and SilverLight stuff