Skip to content
Permalink
512a8429ba
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
35 lines (30 sloc) 1 KB
using App3.Services;
using App3.Views;
using System;
using System.Collections.Generic;
using System.Text;
using Xamarin.Forms;
namespace App3.ViewModels
{
public class LoginViewModel
{
public Command LoginCommand { get; }
public Command RegisterCommand { get; }
IDataService DataService;
public LoginViewModel()
{
LoginCommand = new Command(OnLoginClicked);
RegisterCommand = new Command(OnRegisterClicked);
}
private async void OnLoginClicked(object obj)
{
// Prefixing with `//` switches to a different navigation stack instead of pushing to the active one
await Shell.Current.GoToAsync($"//{nameof(AboutPage)}");
}
private async void OnRegisterClicked(object obj)
{
// Prefixing with `//` switches to a different navigation stack instead of pushing to the active one
await Shell.Current.GoToAsync($"//{nameof(RegistrationPage)}");
}
}
}