DarthMazut / MochaLibrary

Just another MVVM library which gives you some abstract classes out-of-the-box.
0 stars 0 forks source link

Consider adding dedicated method for registering and obtaining app MainWindow #25

Open DarthMazut opened 4 months ago

DarthMazut commented 4 months ago
// How about special method for main window?
var mainWindow = WindowManager.RegisterMainWindow(() => new WindowModule(new MainWindow(), new MainWindowViewModel()));
// OR
var mainWindow = WindowManager.RegisterMainWindow<MainWindow>();
// THEN
var mainWindow = WindowManager.RetrieveMainWindow(); // always same instance if open
DarthMazut commented 3 months ago

How about ShowDialog() and ShowWindow() overload for 0 parameters which will by default take a root from MainWindow?