using Avalonia.Controls; using Avalonia.Interactivity; using LehrerApp.Desktop.ViewModels.Groups; namespace LehrerApp.Desktop.Views.Groups; public partial class WithdrawStudentDialog : Window { public WithdrawStudentDialog() => InitializeComponent(); private void OnSave(object? sender, RoutedEventArgs e) { if (DataContext is not WithdrawStudentDialogViewModel vm) return; vm.SaveCommand.Execute(null); if (vm.WasSaved) Close(true); } private void OnCancel(object? sender, RoutedEventArgs e) => Close(false); }