- tweak: Dependency injection think

This commit is contained in:
2024-12-21 13:11:30 +03:00
parent 9a1bd44a6e
commit 42fde38db6
27 changed files with 541 additions and 242 deletions

View File

@@ -0,0 +1,25 @@
using System;
using System.Windows.Input;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Nebula.Launcher.ViewModels;
namespace Nebula.Launcher.Views;
public partial class MainView : UserControl
{
// This constructor is used when the view is created by the XAML Previewer
public MainView()
{
InitializeComponent();
}
// This constructor is used when the view is created via dependency injection
public MainView(MainViewModel viewModel)
: this()
{
DataContext = viewModel;
}
}