Replace ReactiveUI
This commit is contained in:
parent
43b4d50e43
commit
5584ab4ec8
41 changed files with 472 additions and 1013 deletions
|
|
@ -1,32 +1,16 @@
|
|||
using Avalonia;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
using Dock.Model.Core;
|
||||
|
||||
using InkForge.Desktop.Managers;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
using ReactiveUI;
|
||||
|
||||
namespace InkForge.Desktop.ViewModels;
|
||||
|
||||
public class MainViewModel : ReactiveObject
|
||||
public class MainViewModel : ObservableObject
|
||||
{
|
||||
private readonly DocumentManager _documentManager;
|
||||
public IDock Layout { get; }
|
||||
|
||||
public MainViewModel(InkForgeFactory factory)
|
||||
{
|
||||
Layout = factory.CreateLayout();
|
||||
factory.InitLayout(Layout);
|
||||
|
||||
_documentManager = CreateDocumentManager();
|
||||
}
|
||||
|
||||
private static DocumentManager CreateDocumentManager()
|
||||
{
|
||||
return ActivatorUtilities.CreateInstance<DocumentManager>(
|
||||
Application.Current!.GetValue(App.ServiceProviderProperty)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue