diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml.cs b/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml.cs
index 3e11772ff..1818cbf64 100644
--- a/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml.cs
+++ b/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml.cs
@@ -79,7 +79,11 @@ namespace System.Application.UI
Name = ThisAssembly.AssemblyTrademark;
+ ViewModelBase.IsInDesignMode = ApplicationLifetime == null;
+ Startup.Init();
+
#region 启动时加载的资源
+
SettingsHost.Load();
compositeDisposable.Add(SettingsHost.Save);
UISettings.Language.Subscribe(x => R.ChangeLanguage(x));
@@ -104,8 +108,6 @@ namespace System.Application.UI
public override void OnFrameworkInitializationCompleted()
{
// 在UI预览中,ApplicationLifetime 为 null
- ViewModelBase.IsInDesignMode = ApplicationLifetime == null;
- Startup.Init();
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
#if MAC
diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Base/ViewModelBase.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Base/ViewModelBase.cs
index f74f5a32e..21410ec21 100644
--- a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Base/ViewModelBase.cs
+++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Base/ViewModelBase.cs
@@ -23,7 +23,7 @@ namespace System.Application.UI.ViewModels
///
/// 是否在设计器的上下文中运行
///
- public static bool IsInDesignMode { get; set; }
+ public static bool IsInDesignMode { get; set; } = true;
///