I’m developing a prism application with a ribbon bar on the top, a outlookbar on the left and a tabbed content region (tabcontrol with regionadapter).
I’m using the view injection.
My problem now is: how to inject the tabitem’s own tabcontrol (e.g. edituser button) into the ribbon when switching from one existing tabitem to another one.
I think INavigationAware is not working in this scenario. (right?)
The only approach I could imagine is to hook into the tabheader and do stuff there.
I’m glad of every solution you could give me.
Thanks in advance
I read your response to my question and think Prism’s
EventAggregatorcan help you. It’s designed to faciliate inter-module communication, among other functions as well. Here’s a sample of how you can use it:Get an instance of the EventAggregator. I’m using dependenct injection here:
Create an event to publish (parameter is for a payload). In your case a tab selection:
Publish the event when a tab is selected;
Finally, subscribe to the event and respond:
Now, you should be good to go.