UserViewModel.cs 588 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using Avalonia.Controls;
  4. using AvaloniaApplication1.Models;
  5. using ReactiveUI;
  6. namespace AvaloniaApplication1.ViewModels
  7. {
  8. public class UserViewModel : ViewModelBase
  9. {
  10. UserControl page = new UsersMainPage();
  11. public UserControl Page { get => page; set => this.RaiseAndSetIfChanged(ref page, value); }
  12. public void toProfile()
  13. {
  14. Page = new ProfileUser(MainWindowViewModel.Self.Id);
  15. }
  16. public void toSmesh()
  17. {
  18. Page = new UsersMainPage();
  19. }
  20. }
  21. }