using ReactiveUI; namespace MyAvaloniaApp.ViewModels.Pages; /// /// 设置页面ViewModel /// public class SettingsPageViewModel : ReactiveObject { private bool _darkMode = false; private string _language = "zh-CN"; private bool _notifications = true; private int _refreshInterval = 30; /// /// 深色模式 /// public bool DarkMode { get => _darkMode; set => this.RaiseAndSetIfChanged(ref _darkMode, value); } /// /// 语言设置 /// public string Language { get => _language; set => this.RaiseAndSetIfChanged(ref _language, value); } /// /// 通知设置 /// public bool Notifications { get => _notifications; set => this.RaiseAndSetIfChanged(ref _notifications, value); } /// /// 刷新间隔(秒) /// public int RefreshInterval { get => _refreshInterval; set => this.RaiseAndSetIfChanged(ref _refreshInterval, value); } }