views:

41

answers:

2

I'm using Prism to build my application and 19 of my modules need to interact with an control from another module.

Is there any way to expose a control? I really don't want to use the event system because it would too much of the responsibility on my one know to know about the data being passed to it.

+1  A: 

If you do not wish to use the event aggregator, you could also register something (ie a service, whos interface is defined in your infrastructure dll) with dependency injection that interacts with the control directly.

Jeremiah Morrill
Very good answer. Not sure why the OP made this a wiki, but you get my +1 anyway.
Anderson Imes
A: 

You can always create a separate project that holds "Infrastructure" controls that each module references. This way they gain access to say CommonWindow etc..

mstrickland
I can't seem to get access to the controls. If I have a textblock in my user control in a module I can't get at it from another module.
Detroitpro
You would need to have some intermediate layer to expose the value you are trying to pass. Ie call the module and pass the item in it's call.
mstrickland