InfoUsersDate.axaml.cs 714 B

12345678910111213141516171819202122232425262728
  1. using Avalonia;
  2. using Avalonia.Controls;
  3. using Avalonia.Markup.Xaml;
  4. using System.Collections.Generic;
  5. using TestRepeat.Models;
  6. using TestRepeat.ViewModels;
  7. namespace TestRepeat.Views;
  8. public partial class InfoUsersDate : UserControl
  9. {
  10. public static User CurrentUser { get; set; }
  11. public InfoUsersDate()
  12. {
  13. InitializeComponent();
  14. }
  15. public InfoUsersDate( List<User> listUsers)
  16. {
  17. InitializeComponent();
  18. DataContext = new InfoUsersDateViewModel(listUsers);
  19. }
  20. public InfoUsersDate(User currentUser, List<User> listUsers)
  21. {
  22. InitializeComponent();
  23. CurrentUser = currentUser;
  24. DataContext = new InfoUsersDateViewModel(listUsers);
  25. }
  26. }