UserViewModel.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Microsoft.Toolkit.Mvvm.Input;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using MyMoviesWPF.MVVM.View;
  7. namespace MyMoviesWPF.MVVM.ViewModel
  8. {
  9. public class UserViewModel : BaseViewModel
  10. {
  11. public RelayCommand<object> OpenLogInWindow
  12. {
  13. get => new RelayCommand<object>(o =>
  14. {
  15. LogInView view = new LogInView();
  16. view.Show();
  17. }
  18. );
  19. }
  20. public RelayCommand<object> OpenSignUpWindow
  21. {
  22. get => new RelayCommand<object>(o =>
  23. {
  24. //SignUpView view = new SignUpView();
  25. //view.Show();
  26. }
  27. );
  28. }
  29. //foreach (Window item in Application.Current.Windows)
  30. // {
  31. // if (item.DataContext == this) item.Close();
  32. // }
  33. //public RelayCommand LogInCommand
  34. //{
  35. // get { return _view; }
  36. // set
  37. // {
  38. // _view = value;
  39. // OnPropertyChanged();
  40. // }
  41. //}
  42. }
  43. }