Build error: RadContextMenu.AddHandler

2 posts, 0 answers
  1. C Bates
    C Bates avatar
    33 posts
    Member since:
    Oct 2009

    Posted 20 Dec 2009 Link to this post

    Hello,
    I am trying to programaticaly create a context menu and add it to a control.
    RadContextMenu blobContextMenu = new RadContextMenu(); 
    //buttonContextMenu.EventName = "RightMouseButtonDown"; 
    RadMenuItem item1 = new RadMenuItem() { 
                       Header = "Option1" }; 
    blobContextMenu.Items.Add(item1); 
    blobContextMenu.AddHandler(RadMenuItem.ClickEvent, new RoutedEventHandler(OnContextMenuItemClick)); 
     
    RadContextMenu.SetContextMenu(newblob, blobContextMenu); 
     

    When building, I get the error:
        No overload for method 'AddHandler' takes '2' arguments

    What am I doing wrong?
    Telerik.Windows.Controls, runtime version: v2.0.50727, version 2009.3.1103.1030.
    Thanks for any insight...

  2. C Bates
    C Bates avatar
    33 posts
    Member since:
    Oct 2009

    Posted 20 Dec 2009 Link to this post

    Weird.  I had only
    using Telerik.Windows.Controls;
    When I added 
    using Telerik.Windows;
    it built.

  3. DevCraft banner
Back to Top