This question is locked. New answers and comments are not allowed.
Hi,
Am trying to fire the Click Event on the RadMenuItem using Expression Blend's Event Triggers, but couldn't get it triggered. The trigger fires for the buttons, Checkboxes, etc... but not for the RadMenuItem_Click. I recently upgraded my application to Silverlight 5 and the latest Telerik Controls (Silverlight 5 Q1 2012).
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu NotifyOnHeaderClick="True">
<telerik:RadMenuItem Name="TreeNode_MenuItem_1" Header="Map Zoom" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ei:CallMethodAction TargetObject="{Binding}" MethodName="onContextMenuClick" />
</i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadMenuItem>
<telerik:RadMenuItem Name="TreeNode_MenuItem_2" Header="View Detail Data"/>
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
And here's my ViewModel method.
public void onContextMenuClick(object sender, RoutedEventArgs e)
{
//get the telerik context menu item
RadMenuItem menuItem = e.OriginalSource as RadMenuItem;
}
I did try using RadRoutedEventArgs instead of RoutedEventArgs, and also the EventArgs, but none helped.
Can you help me out with this.
Thanks,
Vidyadhar.
Am trying to fire the Click Event on the RadMenuItem using Expression Blend's Event Triggers, but couldn't get it triggered. The trigger fires for the buttons, Checkboxes, etc... but not for the RadMenuItem_Click. I recently upgraded my application to Silverlight 5 and the latest Telerik Controls (Silverlight 5 Q1 2012).
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu NotifyOnHeaderClick="True">
<telerik:RadMenuItem Name="TreeNode_MenuItem_1" Header="Map Zoom" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ei:CallMethodAction TargetObject="{Binding}" MethodName="onContextMenuClick" />
</i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadMenuItem>
<telerik:RadMenuItem Name="TreeNode_MenuItem_2" Header="View Detail Data"/>
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
And here's my ViewModel method.
public void onContextMenuClick(object sender, RoutedEventArgs e)
{
//get the telerik context menu item
RadMenuItem menuItem = e.OriginalSource as RadMenuItem;
}
I did try using RadRoutedEventArgs instead of RoutedEventArgs, and also the EventArgs, but none helped.
Can you help me out with this.
Thanks,
Vidyadhar.