Dynamic PopupMenu from RiaServices

When I hover over the buttons I have created a menu that displays related slideshowtitles. This is at the moment done static but I want to do it from a riaservice in SimpleMVVM app (http://simplemvvmtoolkit.codeplex.com/).

Note the use of the ".*" selector suffix. This tells the menu to match all elements that start with "btnYear". Finally you have to set UseTriggerElementDataContext to true to associate the datacontext with the selected item while opening the menu.﻿

The only big deal with this setup is that you're only creating one menu for all the generated buttons. So its up to you to choose which one suits you better.

As for the ria services story you will have to create a class that will include the properties Year and Shows(of type List<string>) and create a service method that will return a list of those objects from you db. The purpose of this is to let you
bind the button content to Year and the PopupMenuItem header to Shows, from yet another data template inside the ListBox(which I've omitted). ﻿

I hope you got the big picture already. Feel free to ask me if you have any questions.

NB: You must have noticed that I used the HoverElementSelector property which I recently introduced in the latest change set. You can just rename it back to HoverElements however but I strongly recommend that you update your code accordingly
because it contains a few bugs fixes related to the sample itself.