Flow.Launcher/Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml.cs

21 lines
601 B
C#

using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneGeneral
{
private SettingsPaneGeneralViewModel _viewModel = null!;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
_viewModel = Ioc.Default.GetRequiredService<SettingsPaneGeneralViewModel>();
DataContext = _viewModel;
InitializeComponent();
}
base.OnNavigatedTo(e);
}
}