ReactiveUI

A MVVM framework that integrates with the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform. Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, WPF, Windows Forms, Windows Phone 8 and Wind

ReactiveUI (for .Net 4.0)

Note: this is a RxUI fork for .Net 4.0 support

Use the Reactive Extensions for .NET to create elegant, testable User Interfaces that run on any mobile or desktop platform.

Supported Platforms

  • Xamarin.iOS
  • Xamarin.Android
  • Xamarin.Mac
  • WPF
  • Windows Forms
  • Windows Phone 8
  • Windows Store Apps

This library is organized into several high-level assemblies:

  • ReactiveUI - Core library that doesn’t rely on any particular UI framework. ReactiveObject, the base ViewModel object, as well as ReactiveCollection, a more awesome ObservableCollection, is in here.

  • ReactiveUI.Xaml - Classes that require references to a Xaml’ly framework, like WPF or WinRT. ReactiveCommand, an implementation of ICommand, as well as the UserError classes are in this assembly.

  • ReactiveUI.Blend - This class has several Blend Behaviors and Triggers that make attaching ViewModel changes to Visual State Manager states.

  • ReactiveUI.Routing - A screens and navigation framework as well as ViewModel locator. This framework helps you to write applications using IoC containers to locate views, as well as navigating back and forwards between views.

A Compelling Example

public class ColorChooserThatDoesntLikeGreen : ReactiveObject
{
  //
  // Declaring a read/write property
  //

  byte _Red;
  public byte Red {
    get { return _Red; }
    set { this.RaiseAndSetIfChanged(value); }
  }

  byte _Green;
  public byte Green {
    get { return _Green; }
    set { this.RaiseAndSetIfChanged(value); }
  }

  byte _Blue;
  public byte Blue {
    get { return _Blue; }
    set { this.RaiseAndSetIfChanged(value); }
  }

  //
  // Declaring a Property that's based on an Observable
  // 

  ObservableAsPropertyHelper<Color> _Color;
  public Color Color {
    get { return _Color.Value; }
  }

  ReactiveCommand OkButton { get; protected set; }

  public ColorChooserThatDoesntLikeGreen()
  {
    var finalColor = this.WhenAny(x => x.Red, x => x.Green, x => x.Blue, 
        (r,g,b) => Color.FromRGB(r.Value, g.Value, b.Value));

    finalColor.ToProperty(this, x => x.Color, out _Color);

    // When the finalColor has full green, the Ok button is disabled
    OkButton = new ReactiveCommand(finalColor.Select(x => x.Green != 255));
  }
}

Learn more

For more information on how to use ReactiveUI, check out ReactiveUI.

Related Repositories

ReactiveUI

ReactiveUI

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea aroun ...

ReactiveUI.Samples

ReactiveUI.Samples

This repository will contain all of ReactiveUI samples. ...

ReactiveUI

ReactiveUI

A lightweight replacement for target action with closures, modified from Scream.swift. ...

ReactiveUI.Fody

ReactiveUI.Fody

C# Fody extension to generate RaisePropertyChange notifications for properties and ObservableAsPropertyHelper properties. ...

Caliburn.Micro.ReactiveUI

Caliburn.Micro.ReactiveUI

Caliburn.Micro screens and conductors rewritten to inherit from ReactiveUI ReactiveObject ...


Top Contributors

paulcbetts jlaanstra niik onovotny Haacked mteper oliverw meteficha rikbosch tclem gluck alanpog kentcb timotei flagbug ammeep MerickOWA justin-factory srimoyee-factory casnap npnelson bsiegel distantcam damiensawyer sillyotter nverinaud StanislawSwierc TheGrandUser wendazhou asarium

Releases

-   6.5.0 zip tar
-   6.4.0.1 zip tar
-   6.4.0 zip tar
-   6.3.1 zip tar
-   6.3.0 zip tar
-   6.2.1 zip tar
-   6.2.0 zip tar
-   6.1.0 zip tar
-   6.0.7 zip tar
-   6.0.6 zip tar
-   6.0.5 zip tar
-   6.0.4 zip tar
-   6.0.3 zip tar
-   6.0.2 zip tar
-   6.0.1 zip tar
-   6.0.0 zip tar
-   5.99.6 zip tar
-   5.99.5 zip tar
-   5.99.4 zip tar
-   5.99.3 zip tar
-   5.99.2 zip tar
-   5.99.1 zip tar
-   5.99.0 zip tar
-   5.5.1 zip tar
-   5.5.0 zip tar
-   5.4.0 zip tar
-   5.3.0 zip tar
-   5.2.0 zip tar
-   5.1.2 zip tar
-   5.1.0 zip tar