This is a migrated thread and some comments may be shown as answers.

EventName="MouseRightButtonUp" doesn't work for context menu

3 Answers 88 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 26 Jan 2010, 02:06 AM
Hi:  I am using a context menu when the user clicks a bar on a bar chart.  I can use EventName="MouseLeftButtonUp" with no problems, but I want the user to get the context menu with a right click.  EventName = "MouseRightButtonUp" does not work.  What am I doing wrong?  I'm using Silverlight 4 and your Q3 SP2 release.  The XAML is below.

I'm setting e.handled = true in the mouse down event to avoid the Silverlight popup.  Is that the problem?  If so, how do I prevent that and still get my own context menu?

Thanks!
Terry


<UserControl xmlns:telerikCharting="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting" 
    x:Class="HCDA4.BarChart" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
             xmlns:radNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    > 
    <Grid x:Name="LayoutRoot" Background="White" Loaded="LayoutRoot_Loaded">  
        <telerikCharting:RadChart x:Name="RadChart1" > 
            <radNav:RadContextMenu.ContextMenu> 
             <radNav:RadContextMenu EventName="MouseLeftButtonUp" x:Name="Context_Menu"<!-- works--> 
             <!--<radNav:RadContextMenu EventName="MouseRightButtonUp" x:Name="Context_Menu"> doesn't work --> 
              <radNav:RadMenuItem Header="Top Level KPI" /> 
              <radNav:RadMenuItem Header="Details" /> 
             </radNav:RadContextMenu> 
            </radNav:RadContextMenu.ContextMenu> 
        </telerikCharting:RadChart> 
    </Grid> 
</UserControl> 
 



3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 26 Jan 2010, 07:35 AM
Hello Terry,

I've tested your scenario and RadContextMenu is showing correctly with EventName="MouseRightButtonUp". There is no need to set EventName="MouseRightButtonUp" as this is the default value.
Could you please check that you are using Silverlight 4 beta and RadControls_for_Silverlight4_2009_3_1314.

If that is the case open a support ticket and send us sample project demonstrating the problem.

Regards,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Terry
Top achievements
Rank 1
answered on 26 Jan 2010, 09:28 PM
Hi Hristo:

I verified that I am targeting SL4 and I am running SL4 and my telerik controls are in:

C:\Program Files (x86)\Telerik\RadControls for Silverlight Q3 2009 SP2.  Do I have the wrong beta?  Id doesn't specifically mention SL4.
I'm running 64-bit Windows 7 with VS2010.

0
Nikolay
Telerik team
answered on 27 Jan 2010, 08:31 AM
Hello Terry,

Actually, the RadControls for Silverlight 4 assemblies are offered as a separate download under the RadControls for Silverlight Downloads section:



You should download the0 "RadControls for Silverlight 4 CTP" ZIP file and extract it locally.

Hope this helps.

Regards,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Menu
Asked by
Terry
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Terry
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or