Set ContextMenu

2 posts, 0 answers
  1. ruty
    ruty avatar
    42 posts
    Member since:
    Mar 2009

    Posted 06 Apr 2009 Link to this post


    I have a big rectangle, it contains alot of small rectangles, and when pressing one of them, I need a context menu to open, and when pressing an empty area in the big rectangle, I need a different context menu to open - exactly where the mouse pointer is.
    How I do it????

  2. Boyan
    Boyan avatar
    758 posts

    Posted 08 Apr 2009 Link to this post

    Hi ruty,

    I prepared a sample for you. I used a collection of buttons to attach same context menu to 3 buttons. I did not use Rectangles as they can't have child. You cannot have Big rectangle with small rectangles in it . I have attached 1 context menu to the UserControl so you can click anywhere in the yellow area and you will get a context menu. And there are 3 buttons on the page. When you right click on them you will get different context menu.

    Please take a look at the attached project and tell me if you need more help.

    p.s. Please remember to set Windowless="true" for your Silverlight page, it is set in the .aspx page of your Web project.

    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top