AddTeacher.axaml.cs 444 B

123456789101112131415161718192021
  1. using Avalonia;
  2. using Avalonia.Controls;
  3. using Avalonia.Markup.Xaml;
  4. using TeacheresAndCourses.ViewModels;
  5. namespace TeacheresAndCourses;
  6. public partial class AddTeacher : UserControl
  7. {
  8. public AddTeacher()
  9. {
  10. InitializeComponent();
  11. DataContext = new AddTeacherViewModel();
  12. }
  13. public AddTeacher(int teacherId)
  14. {
  15. InitializeComponent();
  16. DataContext = new AddTeacherViewModel(teacherId);
  17. }
  18. }