DateUser.axaml.cs 442 B

12345678910111213141516171819202122
  1. using Avalonia;
  2. using Avalonia.Controls;
  3. using Avalonia.Markup.Xaml;
  4. using TestRepeat.Models;
  5. using TestRepeat.ViewModels;
  6. namespace TestRepeat.Views;
  7. public partial class DateUser : UserControl
  8. {
  9. public DateUser()
  10. {
  11. InitializeComponent();
  12. DataContext = new DateUserViewModel();
  13. }
  14. public DateUser(User user)
  15. {
  16. InitializeComponent();
  17. DataContext = new DateUserViewModel(user);
  18. }
  19. }