Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Navigation > Navigation from Menu control

Not answered Navigation from Menu control

Feed from this thread
  • Vit100 avatar

    Posted on Apr 27, 2010 (permalink)

    Hi guys,
    I am using Microsoft Business Template for my application and would like to use RadMenu instead of default hyperlink buttons.
    Can U give me an idea how to achive this?

    I created Menu and MenuItems. Then what? How to make navigation?
    Telerik navigations was left only for compatibility, right?

    I started using this way of navigating, but now sure is it correct.

    <RadMenuItem name="RadMenuItem1" header="about page" tag="/About"/>
    ...
    in event handler for the RadMenuItem:

    this

     

     

    .ContentFrame.Navigate(new Uri(RadMenuItem1.Tag.ToString(),UriKind.RelativeOrAbsolute));

     

    Is this usage of the menu correct or there is more elegant way?

    Reply

  • Hristo Hristo admin's avatar

    Posted on Apr 29, 2010 (permalink)

    Hello Vitaliy,

    This usage is ok. But if you want more elegant solution then you could you radMenuItem.Command property and CommandParameter to execute command (like NavigateCommand for example - you have to create such command). In the command parameter you could specify the page to which you have to navigate. And if you use RoutedCommand then you can handle the command in the MainPage and navigate to the page in the parameter.

    I'm attaching simple project demonstrating this approach.
    Let us know if you need more information.

    Kind regards,
    Hristo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Attached files

    Reply

  • Brian avatar

    Posted on Sep 27, 2011 (permalink)

    I'd like to add for anyone trying to use the provided example in their own code: it is critical that NavigationCommands.RegisterNavigarionCommands is called before InitializeComponent is called, otherwise, the event will not fire when the menu item is clicked.  This threw me off for awhile.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > Navigation > Navigation from Menu control
Related resources for "Navigation from Menu control"

Silverlight Navigation Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]