mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-22 05:40:11 +00:00
26 lines
No EOL
727 B
C#
26 lines
No EOL
727 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using MSFSPopoutPanelManager.MainApp.ViewModel;
|
|
using System.ComponentModel;
|
|
using System.Windows;
|
|
|
|
namespace MSFSPopoutPanelManager.MainApp.AppUserControl
|
|
{
|
|
public partial class PreferenceDrawer
|
|
{
|
|
public PreferenceDrawer()
|
|
{
|
|
if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
|
|
{
|
|
InitializeComponent();
|
|
return;
|
|
}
|
|
|
|
var viewModel = App.AppHost.Services.GetRequiredService<PreferenceDrawerViewModel>();
|
|
Loaded += (_, _) =>
|
|
{
|
|
DataContext = viewModel;
|
|
InitializeComponent();
|
|
};
|
|
}
|
|
}
|
|
} |