Flow.Launcher/Flow.Launcher/SettingPages/Views/SettingsPaneHotkey.xaml.cs
2025-02-17 00:00:18 +08:00

23 lines
758 B
C#

using System;
using System.Windows.Navigation;
using Flow.Launcher.SettingPages.ViewModels;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneHotkey
{
private SettingsPaneHotkeyViewModel _viewModel = null!;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
if (e.ExtraData is not SettingWindow.PaneData { Settings: { } settings, MainViewModel: { } mainVM })
throw new ArgumentException("Settings are required for SettingsPaneHotkey.");
_viewModel = new SettingsPaneHotkeyViewModel(settings, mainVM);
DataContext = _viewModel;
InitializeComponent();
}
base.OnNavigatedTo(e);
}
}