1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-28 16:50:11 +00:00
msfs-popout-panel-manager/MainApp/UserControl/HelpDrawer.xaml.cs

26 lines
740 B
C#
Raw Normal View History

2023-07-12 22:41:31 +00:00
using Microsoft.Extensions.DependencyInjection;
using MSFSPopoutPanelManager.MainApp.ViewModel;
using System;
using System.Windows.Controls;
using System.Windows.Navigation;
namespace MSFSPopoutPanelManager.MainApp
{
public partial class HelpDrawer : UserControl
{
private HelpViewModel _viewModel;
public HelpDrawer()
{
_viewModel = App.AppHost.Services.GetRequiredService<HelpViewModel>();
InitializeComponent();
Loaded += (sender, e) => { DataContext = _viewModel; };
}
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
_viewModel.HyperLinkCommand.Execute(e.Uri.ToString());
}
}
}