All Projects → xamvvm → Xamvvm

xamvvm / Xamvvm

Licence: apache-2.0
Simple MVVM (Model, ViewModel, View) Framework for .Net - Xamarin.Forms compatible

Projects that are alternatives of or similar to Xamvvm

Professionalcsharp7
Code samples for the book Professional C# 7 and .NET Core 2.0 (with updates for 2.1), Wrox Press
Stars: ✭ 403 (+244.44%)
Mutual labels:  xamarin, mvvm
Reactiveproperty
ReactiveProperty provides MVVM and asynchronous support features under Reactive Extensions. Target framework is .NET Standard 2.0.
Stars: ✭ 603 (+415.38%)
Mutual labels:  xamarin, mvvm
Restaurant App
Restaurant App 🍔 is a sample open-source e-Commerce 🛒 application for ordering foods, powered by polyglot microservices architecture and cross-platform development including mobile and web
Stars: ✭ 471 (+302.56%)
Mutual labels:  xamarin, mvvm
Caliburn.micro
A small, yet powerful framework, designed for building applications across all XAML platforms. Its strong support for MV* patterns will enable you to build your solution quickly, without the need to sacrifice code quality or testability.
Stars: ✭ 2,404 (+1954.7%)
Mutual labels:  xamarin, mvvm
Xaml Code Experiences
A collection of the experiences I have collected during days of Xamarin and Wpf, while following the MVVM design pattern.
Stars: ✭ 114 (-2.56%)
Mutual labels:  xamarin, mvvm
Xamarin Demos
This repository contains the Syncfusion Xamarin UI control’s samples and the guide to use them.
Stars: ✭ 218 (+86.32%)
Mutual labels:  xamarin, mvvm
Waf
Win Application Framework (WAF) is a lightweight Framework that helps you to create well structured XAML Applications.
Stars: ✭ 539 (+360.68%)
Mutual labels:  xamarin, mvvm
Uno
Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
Stars: ✭ 6,029 (+5052.99%)
Mutual labels:  xamarin, mvvm
Xtoolkit.whitelabel
Modular MVVM framework for fast creating powerful cross-platform applications with Xamarin.
Stars: ✭ 22 (-81.2%)
Mutual labels:  xamarin, mvvm
Reactiveui
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
Stars: ✭ 6,709 (+5634.19%)
Mutual labels:  xamarin, mvvm
Xamu Infrastructure
Extensions, MVVM classes, behaviors and other misc. useful code bits from Xamarin University
Stars: ✭ 144 (+23.08%)
Mutual labels:  xamarin, mvvm
Mvvmnano
The small and smart MVVM framework made with ❤ for Xamarin.Forms.
Stars: ✭ 53 (-54.7%)
Mutual labels:  xamarin, mvvm
Mvvmvalidation
Lightweight library that helps reduce boilerplate when implementing validation in XAML MVVM applications
Stars: ✭ 141 (+20.51%)
Mutual labels:  xamarin, mvvm
Mvvmcross
The .NET MVVM framework for cross-platform solutions, including Xamarin.iOS, Xamarin.Android, Windows and Mac.
Stars: ✭ 3,594 (+2971.79%)
Mutual labels:  xamarin, mvvm
Catel
An application development platform
Stars: ✭ 616 (+426.5%)
Mutual labels:  xamarin, mvvm
Mvvmlight
The main purpose of the toolkit is to accelerate the creation and development of MVVM applications in Xamarin.Android, Xamarin.iOS, Xamarin.Forms, Windows 10 UWP, Windows Presentation Foundation (WPF), Silverlight, Windows Phone.
Stars: ✭ 973 (+731.62%)
Mutual labels:  xamarin, mvvm
Reactivemvvm
Cross-platform ReactiveUI sample app built for a talk at MSK .NET conf.
Stars: ✭ 94 (-19.66%)
Mutual labels:  xamarin, mvvm
Dayvsnight
DayVsNight - A Xamarin.Forms UI Challenge
Stars: ✭ 112 (-4.27%)
Mutual labels:  xamarin
Mobile Sdk
CARTO Mobile SDK core project
Stars: ✭ 116 (-0.85%)
Mutual labels:  xamarin
Presently
Android app for recording gratitude journal entries
Stars: ✭ 109 (-6.84%)
Mutual labels:  mvvm

xamvvm

Simple, fast and lightweight MVVM Framework for Xamarin.Forms with fluent API AppVeyor

Xamvvm.Core Xamvvm.Forms Xamvvm.Forms.RxUI Xamvvm.Mock (Unit Tests)
NuGet NuGet NuGet NuGet
NuGet NuGet NuGet NuGet

Features

  • Very Easy to use. Just mark your pages / models with empty interfaces IBasePage<TPageModelType> / IBasePageModel
  • PageModel first oriented Navigation
  • Automatic wiring of BindingContext (PageModels)
  • Pages / PageModels caching - more responsive UI experience!
  • You're not limited to any concrete implementation of Pages, PageModels
  • Fluent style extensions methods to write less code
  • Navigation inside ContentView
  • Helper classes with ready to use INotifyPropertyChanged implementation eg. BasePageModel
  • Pages have override methods to respond / intercept navigation (eg. NavgationPushing, NavigationCanPush, etc.)
  • Strongly typed classes / methods / messaging
  • Dependency free ICommand implementation prevents multiple execution when previous execution not finished yet

Getting Started

Initialize the Framework

You have to create an instance of a IBaseFactory implementation and set it as the current factory to use

var factory = new XamvvmFormsFactory(this);
XamvvmCore.SetCurrentFactory(factory);

That's all :-)

The PageFactory will scan your assemblies at start up and link Pages and PageModels together according to the IBasePage definition on your Pages. (You can also register your Pages manually if you want to. See Wiki)

PageModel first navigation

All pushing and popping is always done from the PageModel and not from Pages

var pageToPush = this.GetPageFromCache<DetailPageModel>();
await this.PushPageAsync(pageToPush);

// OR even shorter way:
this.PushPageFromCache<DetailPageModel>();

You can pass an int action too that is executed on the Pagemodel before displaying the page

await this.PushPageAsync(pageToPush, (pm) => pm.Init("blue", Color.Blue));

// OR even shorter way:
var pageToPush = this.GetPageFromCache<DetailPageModel>();
this.PushPageFromCache<DetailPageModel>((pm) => pm.Init("blue", Color.Blue));

Popping is as easy

await this.PopPageAsync();

All a page has to do is derive from IBasePage with the PageModelType this Page should be linked to.For the above example calls the used classes would like this.

public partial class DetailPage : ContentPage, IBasePage<DetailPageModel>
{
	public DetailPage()
	{
		InitializeComponent();
	}
}
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="Examples.DetailPage"
		Title="Detail Page">
	<ContentPage.Content>
		<Label Text="{Binding Text}" BackgroundColor="{Binding Color}" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/>
	</ContentPage.Content>
</ContentPage>

public class DetailPageModel : BasePageModel
{
	public void Init(string text, Color color)
	{
		Text = text;
		Color = color;
	}

	public Color Color
	{
		get { return GetField<Color>(); }
		set { SetField(value); }
	}

	public string Text
	{
		get { return GetField<string>(); }
		set { SetField(value); }
	}
}

You don't have to inherit from BasePageModel it's just an included convinience class

Please look into the Wiki for Detailed Information

Support

Please ask questions in this issue We also have a channel in the xamarin slack channel #xamvvm (invitation https://xamarinchat.herokuapp.com/)

Example project

https://github.com/xamvvm/xamvvm/tree/master/examples

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].