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

4 posts, 0 answers
  1. Terry
    Terry avatar
    157 posts
    Member since:
    Jul 2009

    Posted 25 Jan 2010 Link to this post

    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> 
     



  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 26 Jan 2010 Link to this post

    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.
  3. DevCraft banner
  4. Terry
    Terry avatar
    157 posts
    Member since:
    Jul 2009

    Posted 26 Jan 2010 Link to this post

    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.

  5. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 27 Jan 2010 Link to this post

    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.
Back to Top