1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-25 07:10:10 +00:00
msfs-popout-panel-manager/MainApp/UserControl/HelpDrawer.xaml.cs
2023-07-12 18:47:24 -04:00

25 lines
740 B
C#

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());
}
}
}