I'm new to Silverlight and MVVM.
What I'm trying to do is bind an event for the ItemClick for the ContextMenu to the ViewModel.
It doesn't seem to call the delegate in the viewmodel when I apply to the Telerik Context Menu click but it does work for a standard control such as Hyperlink.
Any ideas?
The view:
<
UserControl x:Class="Module.Views.PageMenuView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
xmlns:cal="clr-namespace:Microsoft.Practices.Composite.Presentation.Commands;assembly=Microsoft.Practices.Composite.Presentation"
>
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel Orientation="Vertical">
<HyperlinkButton x:Name="SettingLink" Content="Click" cal:Click.Command="{Binding MenuOptionCommand}" Foreground="Blue"/>
<ToggleButton Content="Export" HorizontalAlignment="Left"
IsChecked="{Binding IsOpen, ElementName=context, Mode=TwoWay}">
<telerikNavigation:RadContextMenu.ContextMenu>
<telerikNavigation:RadContextMenu x:Name="context" Placement="Bottom" telerikNavigation:RadContextMenu.ContextMenu.="{Binding MenuOptionCommand}">
<telerikNavigation:RadMenuItem Header="Export to Excel" />
<telerikNavigation:RadMenuItem Header="Export to PDF" />
</telerikNavigation:RadContextMenu>
</telerikNavigation:RadContextMenu.ContextMenu>
</ToggleButton>
</StackPanel>
</Grid>
</
UserControl>