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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|