You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
523 B

2 months ago
using System;
using ReactiveUI;
2 months ago
namespace MyAvaloniaApp.ViewModels;
/// <summary>
/// 应用程序级别的 ViewModel,实现 IScreen 接口
/// </summary>
public class AppViewModel : ReactiveObject, IScreen
{
public RoutingState Router { get; }
public MainWindowViewModel MainWindowViewModel { get; }
public AppViewModel()
2 months ago
{
Router = new RoutingState();
// 先创建 MainWindowViewModel,传入自身作为 IScreen
MainWindowViewModel = new MainWindowViewModel(this);
2 months ago
}
}