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.
20 lines
511 B
20 lines
511 B
|
2 months ago
|
using ReactiveUI;
|
||
|
|
using System;
|
||
|
|
|
||
|
|
namespace MyAvaloniaApp.ViewModels;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 应用程序级别的 ViewModel,实现 IScreen 接口
|
||
|
|
/// </summary>
|
||
|
|
public class AppViewModel : ReactiveObject, IScreen
|
||
|
|
{
|
||
|
|
public RoutingState Router { get; } = new RoutingState();
|
||
|
|
|
||
|
|
public AppViewModel()
|
||
|
|
{
|
||
|
|
// 配置路由 - 默认导航到主窗口
|
||
|
|
// 注意:这里应该通过依赖注入获取 MainWindowViewModel
|
||
|
|
// Router.Navigate.Execute(new MainWindowViewModel());
|
||
|
|
}
|
||
|
|
}
|