Flow.Launcher/Flow.Launcher/SettingPages/Views/SettingsPaneTheme.xaml.cs
2025-03-16 13:22:45 +08:00

25 lines
738 B
C#

using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
using Page = ModernWpf.Controls.Page;
using Flow.Launcher.Infrastructure.UserSettings;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneTheme : Page
{
private SettingsPaneThemeViewModel _viewModel = null!;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
var settings = Ioc.Default.GetRequiredService<Settings>();
_viewModel = new SettingsPaneThemeViewModel(settings);
DataContext = _viewModel;
InitializeComponent();
}
base.OnNavigatedTo(e);
}
}