RoomSharp.Reactive.WinForms 0.5.5

dotnet add package RoomSharp.Reactive.WinForms --version 0.5.5
                    
NuGet\Install-Package RoomSharp.Reactive.WinForms -Version 0.5.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RoomSharp.Reactive.WinForms" Version="0.5.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RoomSharp.Reactive.WinForms" Version="0.5.5" />
                    
Directory.Packages.props
<PackageReference Include="RoomSharp.Reactive.WinForms" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RoomSharp.Reactive.WinForms --version 0.5.5
                    
#r "nuget: RoomSharp.Reactive.WinForms, 0.5.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RoomSharp.Reactive.WinForms@0.5.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RoomSharp.Reactive.WinForms&version=0.5.5
                    
Install as a Cake Addin
#tool nuget:?package=RoomSharp.Reactive.WinForms&version=0.5.5
                    
Install as a Cake Tool

RoomSharp.Reactive.WinForms

WinForms bindings for RoomSharp.Reactive observable queries.

Installation

dotnet add package RoomSharp.Reactive.WinForms

Bind to BindingList

using RoomSharp.Reactive;
using RoomSharp.Reactive.WinForms;

var list = new BindingList<Todo>();

using var sub = query
    .AsObservable()
    .BindToBindingList(
        list,
        keySelector: t => t.Id,
        mergeExisting: (existing, incoming) =>
        {
            existing.Title = incoming.Title;
            existing.IsDone = incoming.IsDone;
        },
        onError: error => Log(error));

For larger lists or more explicit behavior, pass WinFormsBindingOptions<T>:

using RoomSharp.Reactive;
using RoomSharp.Reactive.WinForms;

var list = new BindingList<Todo>();

using var sub = query
    .AsObservable()
    .BindToBindingList(
        list,
        new WinFormsBindingOptions<Todo>
        {
            KeySelector = todo => todo.Id,
            UpdateMode = ReactiveCollectionUpdateMode.MergeByKey,
            MergeExisting = (existing, incoming) =>
            {
                existing.Title = incoming.Title;
                existing.IsDone = incoming.IsDone;
            },
            OnError = error => Log(error)
        });

Bind to BindingSource (with UI dispatch)

using RoomSharp.Reactive;
using RoomSharp.Reactive.WinForms;

var source = new BindingSource();

using var sub = query
    .AsObservable()
    .BindToBindingSource(
        source,
        this, // Control for UI dispatch
        keySelector: t => t.Id,
        onError: error => Log(error));

The BindingSource overload can suspend binding during updates and preserve sort/filter strings:

using var sub = query
    .AsObservable()
    .BindToBindingSource(
        source,
        this,
        new WinFormsBindingOptions<Todo>
        {
            KeySelector = todo => todo.Id,
            SuspendBindingDuringUpdate = true,
            PreserveSort = true,
            PreserveFilter = true,
            OnError = error => Log(error)
        });

Bind to DataGridView (optional helper)

using RoomSharp.Reactive;
using RoomSharp.Reactive.WinForms;

using var sub = query
    .AsObservable()
    .BindToDataGridView(
        dataGridView1,
        keySelector: t => t.Id,
        onError: error => Log(error));

Control-based overloads dispatch safely to the UI thread and dispose the subscription when the control is disposed. Binding updates report source and merge/update failures through onError instead of silently swallowing them.

BindToDataGridView preserves the current row and first displayed row by default. Disable either behavior when the grid owns navigation explicitly:

using var sub = query
    .AsObservable()
    .BindToDataGridView(
        dataGridView1,
        new WinFormsBindingOptions<Todo>
        {
            KeySelector = todo => todo.Id,
            PreserveCurrentRow = true,
            PreserveScrollPosition = true,
            AutoDisposeWithControl = true,
            OnError = error => Log(error)
        });
Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net9.0-windows7.0 is compatible.  net10.0-windows was computed.  net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.5.5 96 5/10/2026
0.5.4 97 5/1/2026
0.5.3 94 4/30/2026
0.5.2 101 4/28/2026
0.5.1 97 4/27/2026
0.5.0 104 4/20/2026
0.4.7 134 1/15/2026
0.4.6 115 1/11/2026
0.4.5 121 1/3/2026