I am writing a WCF service. It is created in the MainViewModel. The rest of the ViewModel cannot get its object. How do I divide? And it turns out that for all windows one ViewModel.

    1 answer 1

    For example:

    1. Make all your VM services a constructor parameter
    2. Create a service in App.OnStartup , create your VMs in the same place, and transfer to the constructor.
    • Comments are not intended for extended discussion; conversation moved to chat . - PashaPash