1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-22 05:40:11 +00:00
msfs-popout-panel-manager/MainApp/AppUserControl/PreferenceDrawer.xaml.cs

26 lines
727 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
{
public PreferenceDrawer()
{
2024-03-03 05:02:21 +00:00
if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
{
InitializeComponent();
return;
}
2024-03-04 03:10:13 +00:00
var viewModel = App.AppHost.Services.GetRequiredService<PreferenceDrawerViewModel>();
2024-03-03 05:02:21 +00:00
Loaded += (_, _) =>
{
2024-03-04 03:10:13 +00:00
DataContext = viewModel;
2024-03-03 05:02:21 +00:00
InitializeComponent();
};
2024-02-28 02:44:21 +00:00
}
}
}