Collection of MVVM helper classes for any application
Collection of MVVM helper classes for any application
Collection of MVVM helper classes for any application.
NuGets
| Name | Info |
|---|---|
| MvvmHelpers | |
| Development Feed | MyGet |
Checkout this awesome video I made introducing you to MVVM Helpers :)
I wanted to keep this library really small and just created it for myself, but I hope others find it useful. Here is what I added in and feel free to request new things in the Issues tab.
Simple implementation of INotifyPropertyChanged that any class can inherit from.
///
/// Sets the property.
///
/// true, if property was set, false otherwise.
/// Backing store.
/// Value.
/// Property name.
/// On changed.
/// The 1st type parameter.
protected bool SetProperty( ref T backingStore, T value,
[CallerMemberName]string propertyName = "",
Action onChanged = null)//
/// Raises the property changed event.
///
/// Property name.
protected void OnPropertyChanged([CallerMemberName]string propertyName = "")Your base view model! It implements INotifyPropertyChanged and a bunch of default properties such as Title, SubTitle, Icon, IsBusy, IsNotBusy, CanLoadMore.
Best way to group items into a Key/Value pair ObservableCollection for managing groups of data. See my blog post: Enhancing Xamarin.Forms ListView with Grouping Headers
A super awesome ObservableCollection that adds important methods such as: AddRange, RemoveRange, Replace, and ReplaceRange.
Any and all extension methods that are nifty. Here are the current ones:
///
/// Task extension to add a timeout.
///
/// The task with timeout.
/// Task.
/// Duration in Milliseconds.
/// The 1st type parameter.
public async static Task WithTimeout(this Task task, int durationMilliseconds)MVVM Helpers now adds in AsyncCommand and Command under the MvvmHelpers.Commands namespace! It also has a nice WeakEventManager to help your events be garbage collection safe :)
Code & Inspiration from the following:
All I have ever asked is to be active by submitting bugs, features, and sending those pull requests down! Want to go further? Make sure to subscribe to my weekly development podcast Merge Conflict, where I talk all about awesome Xamarin goodies and you can optionally support the show by becoming a supporter on Patreon.
No open issues yet, or sync has not completed.