修复关注碎片报错的问题

This commit is contained in:
muqing 2024-07-19 15:42:13 +08:00
parent 1fccc85b77
commit 4840715ef8
2 changed files with 1 additions and 3 deletions

View File

@ -71,8 +71,6 @@ public partial class App : Application
// Views and ViewModels // Views and ViewModels
services.AddTransient<SettingsViewModel>(); services.AddTransient<SettingsViewModel>();
services.AddTransient<SettingsPage>(); services.AddTransient<SettingsPage>();
//services.AddTransient<MainViewModel>();
//services.AddTransient<MainPage>();
services.AddTransient<HomePageViewModel>(); services.AddTransient<HomePageViewModel>();
services.AddTransient<HomePage>(); services.AddTransient<HomePage>();

View File

@ -24,7 +24,7 @@ namespace RustTools.Views;
public sealed partial class Concern : Page public sealed partial class Concern : Page
{ {
public ConcernViewModel ConcernViewModel { get; set; } public ConcernViewModel ConcernViewModel { get; set; }
public Concern(string v) public Concern()
{ {
ConcernViewModel = App.GetService<ConcernViewModel>(); ConcernViewModel = App.GetService<ConcernViewModel>();
InitializeComponent(); InitializeComponent();