1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 14:10:45 +00:00
msfs-popout-panel-manager/MainApp/AppUserControl/PreferenceDrawer.xaml.cs

28 lines
789 B
C#
Raw Normal View History

2024-03-03 05:02:21 +00:00
using Microsoft.Extensions.DependencyInjection;
using MSFSPopoutPanelManager.MainApp.ViewModel;
using System.ComponentModel;
using System.Windows;
namespace MSFSPopoutPanelManager.MainApp.AppUserControl
2024-02-28 02:44:21 +00:00
{
public partial class PreferenceDrawer
{
2024-03-03 05:02:21 +00:00
private readonly PreferenceDrawerViewModel _viewModel;
2024-02-28 02:44:21 +00:00
public PreferenceDrawer()
{
2024-03-03 05:02:21 +00:00
if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
{
InitializeComponent();
return;
}
_viewModel = App.AppHost.Services.GetRequiredService<PreferenceDrawerViewModel>();
Loaded += (_, _) =>
{
DataContext = _viewModel;
InitializeComponent();
};
2024-02-28 02:44:21 +00:00
}
}
}