I’m assuming the main window’s view model hosts the tabs’ view models in some sort of collection. When the TabViewModel is created, pass an observable (held by the MainWindowViewModel) into their constructors, and use that. Now you no longer have global state to maintain!
--m
--
You received this message because you are subscribed to the Google Groups "ReactiveUI mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reactivexaml...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "ReactiveUI mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/reactivexaml/fVwQ7y_JX7s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to reactivexaml...@googlegroups.com.
Hi Fares,
Something altogether different. J
Instead of creating a MessageBus to deal with passing around objects of type NotificationMessage, instead have the TabViewModel constructor expect a parameter of type IObservable<NotificationMessage>, which MainViewModel can fill however it wants (probably a member variable Subject<NotificationMessage>).
Correct.