2024-03-17 22:27:01 +01:00
|
|
|
using Avalonia;
|
2024-05-02 21:44:13 +02:00
|
|
|
using Avalonia.Controls;
|
2024-03-17 22:27:01 +01:00
|
|
|
|
|
|
|
|
using InkForge.Desktop.ViewModels;
|
|
|
|
|
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2024-02-09 01:23:38 +01:00
|
|
|
|
|
|
|
|
namespace InkForge.Desktop.Views;
|
|
|
|
|
|
2024-05-02 21:44:13 +02:00
|
|
|
public partial class MainWindow : Window
|
2024-02-09 01:23:38 +01:00
|
|
|
{
|
|
|
|
|
public MainWindow()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2024-05-02 21:44:13 +02:00
|
|
|
DataContext = CreateViewModel();
|
2024-03-17 22:27:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static MainViewModel CreateViewModel()
|
|
|
|
|
{
|
|
|
|
|
return ActivatorUtilities.CreateInstance<MainViewModel>(
|
|
|
|
|
Application.Current!.GetValue(App.ServiceProviderProperty)
|
|
|
|
|
);
|
2024-02-09 01:23:38 +01:00
|
|
|
}
|
|
|
|
|
}
|