Skip to content

Releases: reactiveui/ReactiveUI

ReactiveUI 6.0 Preview 7

30 May 19:02
Compare
Choose a tag to compare

What's New

This is a prerelease version of ReactiveUI 6.0 - use at your own release, we make no guarantees that this works for you or even at all.

Check the Ship PR for more info

ReactiveUI 5.5.1

09 Apr 20:29
Compare
Choose a tag to compare

What's New

  • Fix a glitch in XAML-based apps where WhenAny'ing DependencyProperties sometimes wouldn't work (Backport of #558)
  • Bump the version of Rx on MonoMac to the one currently shipping in Mono

ReactiveUI 6.0 Preview 6

28 Mar 23:36
Compare
Choose a tag to compare
Pre-release

What's New

This is a prerelease version of ReactiveUI 6.0 - use at your own release, we make no guarantees that this works for you or even at all.

Check the Ship PR for more info

ReactiveUI 5.5

03 Mar 03:19
Compare
Choose a tag to compare

What's New

Bug Fixes

  • Command bindings in WinForms now affect Enabled (#443, thanks @rzhw)
  • Ensure that common WinForms controls don't get trumped by WPF (#447, thanks @rzhw)
  • Enable BindCommand to work with nested ViewModels (#450, thanks @onovotny!)
  • Attempt to prevent the Mono linker from stripping things we need (#455, thanks @onovotny!)
  • Improvements to iOS binding (#473, #496, thanks @tberman)

Activation

Thanks to the great work by @jen20, the View / ViewModel activation from ReactiveUI 6.0 has been backported to 5.x. Normally large features aren't backported, but due to discovering that DependencyProperties leak memory in bindings without this feature, we decided to backport it.

What do you mean, leaks?

The following code, in a sane world, wouldn't leak:

public MyCoolUserControl()
{
    this.OneWayBind(ViewModel, x => x.FirstName, x => x.FirstName.Text);
}

Normally, when both the View and the ViewModel go out of scope, the GC would clean them both up and everything would be great. However, because of the Dependency Property system, this isn't true. Every time you WhenAny or Bind through a DependencyProperty, you must explicitly clean it up by Disposing. To help out with this, a new method has been created on Views and ViewModels.

Consider the following ViewModel constructor:

public MyBrokenViewModel()
{
    UserError.RegisterHandler(x => {
        // NB: Stuff
    });
}

This is broken because every time we create MyBrokenViewModel, we create another error handler. What Do? What we really want for certain global things like UserError, is for UserError to be subscribed only when the View associated with the ViewModel is visible. However, that information isn't available to ViewModels, and even if it was, it's not super obvious. Let's fix it

How does this work:

Activation allows you, for both Views and ViewModels, to set up the things that should be active when the View is visible. Here's how you do it for ViewModels:

public class MyWorkingViewModel : ReactiveObject, ISupportsActivation
{
    public ViewModelActivator Activator { get; protected set; }

    public ActivatingViewModel()
    {
        Activator = this.WhenActivated(d => {
            // d() registers a Disposable to be cleaned up when
            // the View is deactivated / removed
            d(UserError.RegisterHandler(x => {
                // NB: Stuff
            }));
        });
    }
}

Here's how it works for Views:

public class MyWorkingView : UserControl, IViewFor<MyWorkingViewModel>
{
    public ActivatingView()
    {
        this.WhenActivated(d => {
            Console.WriteLine("Helloooooo Nurse!")
            d(Disposable.Create(() => Console.WriteLine("Goodbye, Cruel World")));
        });
    }
}

Note that calling WhenActivated in a View automatically means that the associated ViewModel gets notified for activated / deactivated changes (and in fact, you must call WhenActivated in the View to get the ViewModel to be notified).

ReactiveUI 6.0 Preview 4

30 Jan 04:50
Compare
Choose a tag to compare
Pre-release

What's New

This is a prerelease version of ReactiveUI 6.0 - use at your own release, we make no guarantees that this works for you or even at all.

Check the Ship PR for more info

ReactiveUI 6.0 Preview 1

24 Dec 21:45
Compare
Choose a tag to compare
Pre-release

What's New

This is a prerelease version of ReactiveUI 6.0 - use at your own release, we make no guarantees that this works for you or even at all.

Check the Ship PR for more info

ReactiveUI 5.4.0

13 Dec 22:42
Compare
Choose a tag to compare

What's New

Since some of these fixes change behavior (such as the NLog fix), this is a minor release - however, most of these changes shouldn't affect existing programs

Bug Fixes

  • Allow binding to 3rd party control libraries in WinForms (#405, thanks @rikbosch)
  • Fix F# friendly ObservableForProperty (#407, thanks @marklam)
  • Clean up NuSpec files for Xamarin on Visual Studio (#410, thanks @onovotny)
  • Fixes to deserializing ReactiveObjects using certain serializers (#412, thanks @meteficha)
  • Small improvements to derived collections (#417, thanks @meteficha)
  • Change NLog to use the full class name so it is easier to filter on (thanks @npnelson)
  • Race condition and reentrancy fixes to Reactive(Table/Collection)ViewSource (#425 + #426 + #433, thanks @meteficha)
  • Remove Pex from the list of test runners because it conflicts with WriteableBitmapEx (#428, thanks @tiagomargalho)
  • Fix up some of the collection interfaces (#430, thanks @haacked)
  • Add Count* observables to list interfaces (#436, thanks @onovotny)
  • Disable setting up ViewHosts in design mode

ReactiveUI 5.3.0

20 Nov 20:14
Compare
Choose a tag to compare

What's New

Improved iOS Table View / Collection View support

Thanks to @meteficha and @alanpog, ReactiveUI's support for UITableView and UICollectionView is now vastly improved. We now support:

  • Custom Section Headers and Footers
  • Support for UICollectionView via new ReactiveCollectionViewSource class, similar to ReactiveTableViewSource
  • Support for adding / removing sections dynamically in a Reactive way, via the Data property on ReactiveTableViewSource
  • Added several new IViewFor-friendly Cocoa view subclasses, such as ReactiveCollectionViewCell
  • You can now easily detect when the table has finished updating to avoid making changes during a table reshuffle, via DidPerformUpdates

ViewModelViewHost and RoutedViewHost for WinForms

Thanks to @rikbosch, ReactiveUI.WinForms now has support for both RoutedViewHost and ViewModelViewHost, so you can create IViewFor-based Controls. (#396)

Bug Fixes

  • Make FuncDependencyResolver handle GetService correctly via returning the last item (#389), thanks @journeyman!
  • Fix a race condition in ObservableAsyncMRUCache, thanks @npnelson!
  • Create an overload of ObservableForProperty that's a bit more F# friendly, thanks @marklam!
  • Code cleanups to our project files (#387), thanks @pH-minamo!

ReactiveUI 5.2.0

12 Oct 07:24
Compare
Choose a tag to compare

What's New

iOS Improvements

This release adds Reactive versions of a number of common UIKit classes, such as UIImageView. RxUI also now comes with a new class for UITableViewSource, ReactiveTableViewSource. This class will wrap a ReactiveList<ViewModel> class and automatically animate in and out cells from the table view as they change (PR #377)

Android improvements

This release adds basic binding support for common Android controls, thanks to #371. Thanks @oliverw!

Combined Commands

ReactiveCommand now supports combining commands, so it's easy to create a command that invokes one or more "child" commands, check out #382 for more information.

Modern Xamarin support

ReactiveUI is now built against the official Xamarin Rx binaries. This means that on MonoMac, you need to be up-to-date on the latest Mono install.

Bug Fixes

  • Fixes to ViewLocator to be more helpful if registration isn't set up (#359, thanks @terenced!)
  • Move RxUI.Mobile interfaces to the portable library so you can use them from PLibs (#364)
  • Perf improvement when looking up interfaces (#366, thanks @2asoft!)
  • Fixes to Auto Data Template (#367, thanks @ChrisWay!)
  • Fix to AutoPersist (#383, thanks @vevix!)
  • Updates to handle the latest Rx Microsoft release
  • Make sure ReactiveCommand's IsExecuting always comes back on the UI thread (#373)

ReactiveUI 5.1.0

09 Aug 12:28
Compare
Choose a tag to compare

What's New

Windows Forms Support

Thanks to the great work of @rikbosch, ReactiveUI now has initial Windows Forms support. This includes an initial hack at binding to Windows Forms properties, as well as command binding. Grab it by installing the NuGet package:

Install-Package ReactiveUI-Winforms

New APIs

this.WhenAnyValue(x => x.Foo)  // Same as this.WhenAny(x => x.Foo, x => x.Value)

Weird Version Numbers?!

Some things went wrong with NuGet with this release, so the last version number may not match (it will either be "5.1.1" or "5.1.2"). Ignore the man behind this curtain.

Other Stuff

  • Bug fixes to ReactiveList and CreateDerivedCollection
  • Use less internal caching when on mobile platforms (#346)
  • Several fixes to iOS support, especially on-device
  • Allow setting the initial CanExecute state of ReactiveCommand to be false (
  • Bugfixes to OneWayBind (#331)
  • Fix a designer crash in RoutedViewHost (#341)

Greetz

Thanks to @niik, @jlaanstra, @dahlbyk, @ChrisWay, and @sillyotter for their help on this release!