G
G
Georgy Kuznetsov2021-11-23 02:58:34
WPF
Georgy Kuznetsov, 2021-11-23 02:58:34

How to use WPF elements to call another window without deviating from the MVVM pattern?

Let's say we have a project with the following content:

-- mainWindow --
|
-> -- views --
    +firstwindow.cs
|
-> -- viewmodels --
    +firstwindowviewmodel.cs

+mainwindow.xaml
+mainwindowviewmodel.cs


How to call firstwindow from mainwindow with such architecture?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LiptonOlolo, 2021-11-23
@JoeSmith3100

Have a service that manages your windows.
Request a service interface in any VM.
Exchange data between windows through another service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question