We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3761551 commit 83975c9Copy full SHA for 83975c9
src/WEventViewer/App.axaml.cs
@@ -21,7 +21,10 @@ public override void OnFrameworkInitializationCompleted()
21
collection.AddSingleton<EventLogRepository>();
22
collection.AddSingleton<IViewModelFactory, ViewModelFactoryServiceProvider>(provider => new ViewModelFactoryServiceProvider(provider));
23
collection.AddSingleton<MainWindowViewModel>();
24
- collection.AddSingleton<OpenLogWindowViewModel>();
+ if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime classic)
25
+ {
26
+ collection.AddSingleton<OpenLogWindowViewModel>(provider => new OpenLogWindowViewModel() { });
27
+ }
28
collection.AddSingleton<MainWindow>(provider =>
29
{
30
return new MainWindow(provider.GetRequiredService<IViewModelFactory>())
0 commit comments