Nuget package with base class to work with MVVM (Model View ViewModel) without dependence of framework. Save time with this library and enjoy to drink coffee. ☕
NuGet
Name | Info |
---|---|
MVVMCoffee |
Platform Support
MVVMCoffee is a .NET Standard 2.0 library.Its only dependency is the Xamarin.Forms
Install the package in the shared project and use.
using MVVMCoffee.Models;
namespace Demo.Models
{
public class Customer : BaseModel
{
public string Name
{
get { return _name; }
set { SetProperty(ref _name, value); }
}
string _name = string.Empty;
}
}
using MVVMCoffee.ViewModels;
namespace Demo.ViewModels
{
public class CustomerViewModel : BaseViewModel
{
...
PushAsync
await Navigation.PushAsync<CustomerViewModel>(false);
PushModalAsync
await Navigation.PushAsync<CustomerViewModel>(true);
SetRootAsync
await Navigation.SetRootAsync<CustomerViewModel>();
PopAsync
await Navigation.PopAsync(false);
PopModalAsync
await Navigation.PopAsync(true);
PopToRootAsync
await Navigation.PopToRootAsync();