RadMenu event for silverlight

2 posts, 0 answers
  1. Michal Revivo
    Michal Revivo avatar
    22 posts
    Member since:
    Mar 2009

    Posted 01 Jul 2008 Link to this post

    I successfully populate a radMenu silverlight control.
    How I can catch event when the user is clicking on one of the menu ?
    and how I retrieve info on the menu item selected ?
    Thanks in advance
  2. Hristo
    Hristo avatar
    832 posts

    Posted 02 Jul 2008 Link to this post

    Hi Fred,

    RadMenuItem class exposes Click, Checked, Unchecked, SubmenuOpened and SubmenuClosed events. You can attach event handlers to the events you need.

    public partial class Page : UserControl  
       public Page()  
          RadMenu menu = new RadMenu();  
          RadMenuItem item = new RadMenuItem();  
          item.Click += new RoutedEventHandler(MenuItemClick);  
          RootElement.Children.Add(menu); // RootElement is a Grid defined in Page XAML   
       void MenuItemClick(object sender, RoutedEventArgs e)  
          RadMenuItem item = sender as RadMenuItem;  
          //Use the MenuItem  

    To see if some item is checked, you can use IsChecked property.

    If you have any other questions, do not hesitate to ask.

    Best wishes,
    the Telerik team
    Instantly find answers to your questions at the new Telerik Support Center
Back to Top