Skip to content

benruehl/Smaragd

 
 

Repository files navigation

Icon Smaragd

CI Status NuGet version

This is a very lightweight library containing base classes for implementing .NET applications using the MVVM architecture. It is fully unit tested and platform independent.

For an example project, please visit my other project Stein, where it is used in a WPF environment.

Features

This library contains base implementations of:

  • INotifyPropertyChanging and INotifyPropertyChanged
  • INotifyDataErrorInfo
  • ICommand and asynchronous IAsyncCommand

Additionally, there are other base classes that provide additional features, for example TreeViewModel implements an IsChecked property that automatically updates its parent and children.

For more information, please visit the documentation.

Installation

The recommended way to use this library is via Nuget.

Currently supported frameworks:

  • .NET Standard 2.0 or higher
  • .NET Framework 4.5 or higher

Quick Start

For most applications, it is recommended that viewmodels inherit from the ViewModel base class (more info), but if you only need an implementation for INotifyPropertyChanged (or INotifyPropertyChanging) you may use the Bindable base class (more info) instead.

Commands may inherit from either ViewModelCommand<> or AsyncViewModelCommand<> (more info).

For an overview of the provided interfaces and classes please visit the documentation.

Why another MVVM library?

This library originated in my other project Stein and was subsequently moved to its own repository and nuget package. The goal is to provide a great yet minimal foundation which also promotes a good code style. Nearly everything is marked virtual (except events) so you can customize it to fit your needs.

And of course, this library is 🚀blazing fast🚀.

Contribution

If you find a bug feel free to open an issue. Contributions are also appreciated.

About

A platform-independent, lightweight library for developing .NET applications using the MVVM architecture

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%