21 lines
602 B
C#
21 lines
602 B
C#
using Hyperbar.Windows.Controls;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Hyperbar.Windows;
|
|
|
|
public class AppInitializer([FromKeyedServices(nameof(WidgetBarViewModel))] WidgetBarView view,
|
|
[FromKeyedServices(nameof(WidgetBarViewModel))] WidgetBarViewModel viewModel,
|
|
DesktopFlyout desktopFlyout,
|
|
AppConfiguration configuration) :
|
|
IInitializer
|
|
{
|
|
public Task InitializeAsync()
|
|
{
|
|
view.DataContext = viewModel;
|
|
|
|
desktopFlyout.Placement = configuration.Placement;
|
|
desktopFlyout.Content = view;
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
} |