This project has moved. For the latest updates, please go here.

Dynamic Menu from Views in Multiple XAP

Jun 21, 2012 at 2:45 PM

In this post Jeremy said that "You probably want something like a manifest however so you can pre-build your tabs or menu items and just trigger the load when selected - obviously you're not going to "discover" the menu items because the other XAPs haven't loaded yet."

How do I make a manifest or pre-build my menu items?

Coordinator
Jun 21, 2012 at 2:48 PM

My suggestion would be to create a lightweight XML or JSON file that has name/value pairs of menu items and the XAP they exist in. Then in the bootstrapper you can read that in (make sure you are reading relative to the website and not embedded this in the XAP to make it easy to deploy updates) and configure the view routes that way. Make sense?

Jun 21, 2012 at 2:51 PM

I can understand the file. But for the bootstapper what does it do? Check whether the XAP exist?

Coordinator
Jun 23, 2012 at 2:51 PM

No, the bootstrapper reads in the XML document and calls the fluent interface to configure view routes, i.e. calls to this interface:

http://jounce.codeplex.com/SourceControl/changeset/view/89754#1670382

Basically, call it to configure a view with a XAP, and then when you navigate the view you can automatically load that XAP.