using CommunityToolkit.Mvvm.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using MvvmCommunityApp.interfaces;
using MvvmCommunityApp.services;
using MvvmCommunityApp.viewmodels;
using System.Windows;
namespace MvvmCommunityApp
{
///
/// Interaction logic for App.xaml
///
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
// setup mvvm ioc
Ioc.Default.ConfigureServices(
new ServiceCollection()
.AddTransient()
.AddSingleton()
.BuildServiceProvider());
// load the main / entry page
MainWindow wnd = new MainWindow();
wnd.Title = "Something else";
wnd.Show();
}
}
}