Skip to content
Marc Rousavy edited this page Jul 3, 2018 · 12 revisions

Jellyfish Wiki

An incredibly light and type safe MVVM library for .NET WPF, Silverlight, Xamarin and UWP

This wiki shows usage of the Jellyfish framework. Use the right navigation bar for accessing the pages.

Jellyfish aims to eliminate boilerplate MVVM code (such as commands, INotifyPropertyChanged, ..) as much as possible, while providing additional functionality such as application preferences, message feeds and more.

Results

With Jellyfish

public class LoginViewModel : ViewModel
{
    private User _user;
    public User User
    {
        get => _user;
        set => Set(ref _user, value);
    }
}

Without Jellyfish

public class LoginViewModel : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;

    protected virtual void OnPropertyChanged(string propertyName)
    {
          PropertyChangedEventHandler handler = PropertyChanged;
          if (handler != null)
          {
              handler(this, new PropertyChangedEventArgs(propertyName));
          }
    }

    private string _username;
    public string Username
    {
        get
	{
	    return _username;
	}
	set
	{
	    _username = value;
	    OnPropertyChanged("Username");
	}
    }
}