Designing a silverlight dashboard with mef - is it possible? (with dynamic loading of xaps)

Posted by Tim Robbin on Stack Overflow See other posts from Stack Overflow or by Tim Robbin
Published on 2010-05-02T13:40:02Z Indexed on 2010/05/02 13:47 UTC
Read the original article Hit count: 306

Filed under:
|

Hello!

I am just trying to wrap my head around MEF. And as I am really going to love it ( I guess ) I started my first sample project and immediatly stumbled into a big problem and now I am asking myself if I can use MEF for my scenario at all and that is the following:

Imagine that one got some kind of dashboard with, let's say, five regions and above each region there are two comboboxes. The values in the first combobox represent different possible views (for example, chartControl, tableControl, pictureControl, ...) and the values of the second combobox represents the different data sources for the currently selected control.

As the controls are very big in size one wants to download them as needed.

If the user selects one comboboxitem the corresponding control xap should be loaded and displayed in this specific region. If the user selectes another control in the same combobox the control should be removed from the visualtree and the next control should be downloaded and displayed. If the user changes the selection in a different combobox the corresponding control should be loaded again only in this specific region, with perhaps different data.

And to make it a little more interesting - as this is some kind of dashboard one can change the layout from five regions to - for example - ten regions.

I've seen the video "MVVM with MEF in Silverlight Video Tutorial Part 2: Plugins and Metadata" ( http://csharperimage.jeremylikness.com/2010/03/mvvm-with-mef-in-silverlight-video_09.html ) but he is using an ItemsControl and is working with Visibility and he only got ONE region. So I think that this technique is not working for me...

Puh, I hope I could make myself clear!
Thanks a lot for any piece of information!!!

Greetings,
Tim.

© Stack Overflow or respective owner

Related posts about MEF

Related posts about Silverlight