feat(01-07): add ProfileManagementDialog with DI factory wiring
- Create Views/Dialogs/ProfileManagementDialog.xaml (modal Window with Name/TenantUrl/ClientId fields and TranslationSource bindings) - Create Views/Dialogs/ProfileManagementDialog.xaml.cs (DI constructor injection, LoadAsync on Loaded) - Add OpenProfileManagementDialog factory delegate to MainWindowViewModel - Wire ManageProfilesCommand to open dialog via factory, reload profiles after close - Register ProfileManagementDialog as Transient in DI (App.xaml.cs) - Inject IServiceProvider into MainWindow constructor for DI-resolved dialog factory
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Windows;
|
||||
using SharepointToolbox.ViewModels;
|
||||
|
||||
namespace SharepointToolbox.Views.Dialogs;
|
||||
|
||||
public partial class ProfileManagementDialog : Window
|
||||
{
|
||||
public ProfileManagementDialog(ProfileManagementViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = viewModel;
|
||||
Loaded += async (_, _) => await viewModel.LoadAsync();
|
||||
}
|
||||
|
||||
private void CloseButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user