should i use shared service?

Topics: Prism v4 - Silverlight 4
Oct 21, 2011 at 4:59 AM

I have a left region for menu, right region as main content (typical stuff)

a menu module to load the ui in the menu region.

when an menu item is clicked, it will fire an event, and this should be handle/consume by other module (main content)

i using event aggregration, its "kind" of work:

when menu A clicked, load ModuleA, and fire event MenuClicked

within ModuleA, consume the MenuClicked.

it worked only after the ModuleA is loaded. in short, menu A clicked 1st time, no effect. after ModuleA loaded, clicked again menu A, then only it worked.

Should I adopt service to handle this?

I can't find much details about using "RegisterViewAndServices" . All samples show using RegisterType over view/viewModel. I don't see how this view/viewModel should be involved and related.

Oct 21, 2011 at 5:25 AM
Edited Oct 21, 2011 at 5:27 AM

How do you load ModuleA? I think there is no need to manually loading modules. Make it's autoloading.

Then in the menu's module register view: RegisterType<object, ViewType>(ViewName). To navigate use RequestNavigate.

Nov 8, 2011 at 3:34 AM
jjanavichus wrote:


Thx for the input, though my issue is related module not being loaded.

workaround in