0

Is it possible to have the Caliburn.Micro ViewModel first feature without attaching the bootstrapper to App.xaml and without calling DisplayRootViewFor<MainWindowViewModel>() in the OnStartup() method?

Best regards

Mark
  • 143,421
  • 24
  • 428
  • 436
Yannik
  • 709
  • 1
  • 7
  • 11
  • You could load your window with window manager, but why do you want to do that? – FCin Nov 21 '17 at 11:29
  • We cannot modify the main window and application startup, but we would like to use view model first approach in our sub component. – Yannik Nov 21 '17 at 12:55
  • If you cannot modify `Startup` inside `App.xaml` then your application will always load from the default start file. You could try to do this:`IoC.Get().ShowWindow(IoC.GetInstance(typeof(YourViewModel), null), null, null);`(this is what `DisplayRootViewFor` does internally), but I don't think it will work, because you have `Startup` property inside `App.xaml` and you may end up with 2 windows showing up... – FCin Nov 21 '17 at 13:23

0 Answers0