Have the button publish an event from its command execute method :
public class RibbonViewModel {
IEventAggregator events;
public RibbonViewModel (IEventAggregator events){
this.events = events;
}
public void ButtonClickCommandExecute(){
events.Publish(new SomeMessage{
SomeNumber = 5,
SomeString = "Blah..."
});
}
}
Each of your ViewModel should subscribe to this event, and react on it if it is the "active" ViewModel :
public class ViewModelWithDataGrid : IHandle<SomeMessage>{
public void Handle(SomeMessage message){
if(IsActive){
//do something with the message
}
}
}
This way event source is not coupled to event sink, and you can easily unit test whenever a VM should respond to an event.
Documentation : http://caliburnmicro.codeplex.com/wikipage?title=The%20Event%20Aggregator&referringTitle=Documentation