Take into account that in a composite scenario, the command handler might be a view model that does not have any associated elements in the visual tree or is not the focused element.
For this reasons Prism provides guidance to support this kind of scenarios with
DelegateCommands (which allows you to call a delegate method when the command is executed) and
CompositeCommands (which allows you to combine multiple commands).
On the other hand, Prism also provides you an EventAggregator event mechanism. As MSDN documentation shows: “(…) enables communications between loosely coupled components in the application. This mechanism, based on the
event aggregator service, allows publishers and subscribers to communicate through events and still do not have a direct reference to each other.
(…)Consider using the EventAggregator to publish an event across modules and when sending a message between business logic code, such as controllers and presenters”
Based on my understanding of your scenario you could use EventAggregator in your approach, since you need to communicate between any focused view and your user control. publishing an event and then subscribe to it in order to fulfill your
Additionally, you can read more about these topics in
Chapter 9: Communicating Between Loosely Components
Please let me know if this information helps you.