Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mvvm-helpers

> 编程语言
Open source

Collection of MVVM helper classes for any application

721 stars0 likes1 views
WebsiteGitHub

About

Collection of MVVM helper classes for any application

MVVM Helpers

Collection of MVVM helper classes for any application.

Build Status:

NuGets

Name Info
MvvmHelpers
Development Feed MyGet

Get Started

Checkout this awesome video I made introducing you to MVVM Helpers :)

What's included?

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.

ObservableObject

Simple implementation of INotifyPropertyChanged that any class can inherit from.

csharp
/// 
/// 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)
csharp
// 
/// Raises the property changed event.
/// 
/// Property name.
protected void OnPropertyChanged([CallerMemberName]string propertyName = "")

BaseViewModel

Your base view model! It implements INotifyPropertyChanged and a bunch of default properties such as Title, SubTitle, Icon, IsBusy, IsNotBusy, CanLoadMore.

Grouping

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

ObservableRangeCollection

A super awesome ObservableCollection that adds important methods such as: AddRange, RemoveRange, Replace, and ReplaceRange.

Utils

Any and all extension methods that are nifty. Here are the current ones:

csharp
/// 
/// 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)

AsyncCommand, Command, and WeakEventManager

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:

  • AsyncCommand blog from John Thiriet
  • AsyncAwaitBestPracties by @brminnick
  • Xamarin.Forms Command and WeakEventManager

Want To Support This Project?

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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言