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

27 lines
756 B
C#

using System.Windows.Navigation;
using CommunityToolkit.Mvvm.DependencyInjection;
using Flow.Launcher.SettingPages.ViewModels;
namespace Flow.Launcher.SettingPages.Views;
public partial class SettingsPaneAbout
{
private SettingsPaneAboutViewModel _viewModel = null!;
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (!IsInitialized)
{
_viewModel = Ioc.Default.GetRequiredService<SettingsPaneAboutViewModel>();
DataContext = _viewModel;
InitializeComponent();
}
base.OnNavigatedTo(e);
}
private void OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
App.API.OpenUrl(e.Uri.AbsoluteUri);
e.Handled = true;
}
}