feat(14-01): add DirectoryDataGrid_MouseDoubleClick code-behind handler
- Extracts GraphDirectoryUser from DataGrid.SelectedItem on double-click - Invokes SelectDirectoryUserCommand to add user to audit pipeline - Using added for SharepointToolbox.Core.Models Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Windows.Controls;
|
||||
using SharepointToolbox.Core.Models;
|
||||
using SharepointToolbox.Services;
|
||||
using SharepointToolbox.ViewModels.Tabs;
|
||||
|
||||
@@ -24,4 +25,14 @@ public partial class UserAccessAuditView : UserControl
|
||||
listBox.SelectedItem = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void DirectoryDataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is DataGrid grid && grid.SelectedItem is GraphDirectoryUser user)
|
||||
{
|
||||
var vm = (UserAccessAuditViewModel)DataContext;
|
||||
if (vm.SelectDirectoryUserCommand.CanExecute(user))
|
||||
vm.SelectDirectoryUserCommand.Execute(user);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user