- 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
20 lines
472 B
C#
20 lines
472 B
C#
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();
|
|
}
|
|
}
|