Skip to content

Instantly share code, notes, and snippets.

<Button Command="{Binding LoginCommand}" Text="Login" />
private RelayCommand _loginCommand;
public RelayCommand LoginCommand
{
get
{
return _loginCommand
?? (_loginCommand = new RelayCommand(
async () =>
// Pass parameter to view model
var model = page.BindingContext as BaseViewModel;
if (model != null)
await model.OnNavigated(parameter);
using Definition.Interfaces;
using Mobile.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Mobile.View