Using ParagraphImageMenuItemViewMode - How to trigger click event?

2 posts, 0 answers
  1. Eric
    Eric avatar
    4 posts
    Member since:
    Feb 2011

    Posted 03 Mar 2011 Link to this post

    Hi,
    I was able to successfully trigger the click event for radmenu with the below.  But how would it work for ParagraphImageMenuItemViewMode?  I have a mix of regular menu item and paragraph image menu.
    How do I retrieve the title for paragraphimagemenu instead of the header?  I would like to get the title to case select when user selects the paragraphimagemenuitem.
     

    private

     

     

    void MenuItemClick(object

    sender, RoutedEventArgs e)

     

     

     

    {

     

    RadRoutedEventArgs args = e

     

     

     

    as

    RadRoutedEventArgs;

     

     

     

    RadMenuItem menuItem = args.OriginalSource

     

     

     

    as

    RadMenuItem;

     

     

     

     

     

     

     

    string

    page = Convert.ToString(menuItem.Header);

     

     

     

     

     

    switch

    (page)

     

     

     

    {

     

     

     

     

     

    case "Bar"

    :

     

     

     

     

     

     

     

     

    // LoadPage1();

     

     

     

     

     

     

    break

    ;

     

     

     

     

     

     

     

    case "Chart"

    :

     

     

     

     

     

     

     

     

    // LoadPage2();

     

     

     

     

     

    break

    ;

     

     

     

    }
    }

    Thanks
  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 08 Mar 2011 Link to this post

    Hi Eric,

    I think you can cast the DataContext of the RadMenuItem to ParagraphImageMenuItemViewMode and get the properties you want.

    Regards,
    Pana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
Back to Top