Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

DLToolkit PageFactory - simple MVVM for Xamarin.Forms (github)

$
0
0

DLToolkit.PageFactory for Xamarin.Forms

The main reason for creation of PageFactory was that I needed very simple to use library which would free me from implementing the same things for any Xamarin.Forms project I created all over again. Those things were eg. Page Caching, ViewModel oriented Navigation, INotifyPropertyChanged implementation, ViewModel and Page/ViewModel messaging, etc. I also wanted my ViewModels to be as clean as possible (dependency free).

There's no additional configuration needed. All you need is:

  • ViewModels implementing INotifyPropertyChanged interface (or IBaseMessagable interface if you want receive messages also in ViewModel) or using BaseViewModel (ready to go implementation of it)
  • Define your pages as PF[PageType] (eg. PFContentPage<YourViewModelType> instead ContentPage OR inherit from them if you make a custom pages types) OR Implement IBasePage<INotifyPropertyChanged> interface (undocumented) for your custom pages types.
  • Set your MainPage as navigation page returned from XamarinFormsPageFactory.Init() method

Project site:

https://github.com/daniel-luberda/DLToolkit.PageFactory/ (You can find some examples there)

NuGet:

https://www.nuget.org/packages/DLToolkit.PageFactory.Forms/ (PCL compatibile)
https://www.nuget.org/packages/DLToolkit.PageFactory.Shared/ (PCL compatibile)

If you're interested - Feel free to test it (it's in early stage). Just mind it's in alpha.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>