public UserViewModel() { Login = new RelayCommand<object>(UserLogin); Register = new RelayCommand(UserRegistration); Save = new RelayCommand<object>(AddOrUpdateUser); Back = new RelayCommand(NavigateBack); }
public AccountViewModel(PWManager.Models.User user) { if (DesignerProperties.GetIsInDesignMode( new System.Windows.DependencyObject())) return; Accounts = new ObservableCollection<Account>(_repository.GetAccountsAsync(user.Id).Result); SaveCommand = new RelayCommand(AddAccount); UpdateCommand = new RelayCommand(Update); }
/// <summary> /// /// </summary> public MainWindowViewModel() { NavigationCommand = new RelayCommand<string>(OnNavigation); }