BB84.WinForms.Extensions 3.1.831

There is a newer version of this package available.
See the version list below for details.
dotnet add package BB84.WinForms.Extensions --version 3.1.831
                    
NuGet\Install-Package BB84.WinForms.Extensions -Version 3.1.831
                    
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="BB84.WinForms.Extensions" Version="3.1.831" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BB84.WinForms.Extensions" Version="3.1.831" />
                    
Directory.Packages.props
<PackageReference Include="BB84.WinForms.Extensions" />
                    
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 BB84.WinForms.Extensions --version 3.1.831
                    
#r "nuget: BB84.WinForms.Extensions, 3.1.831"
                    
#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 BB84.WinForms.Extensions@3.1.831
                    
#: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=BB84.WinForms.Extensions&version=3.1.831
                    
Install as a Cake Addin
#tool nuget:?package=BB84.WinForms.Extensions&version=3.1.831
                    
Install as a Cake Tool

net462 net481 net80 net90

BB84.WinForms.Extensions

Specialized extension methods for Windows Forms controls, focusing on simplified data binding.

Usage

Depending on the application, there are several ways to skin a cat.

Basic Data Binding
using BB84.WinForms.Extensions;

public partial class MyForm : Form
{
    private MyViewModel viewModel = new();

    public MyForm()
    {
        InitializeComponent();
        SetupDataBindings();
    }

    private void SetupDataBindings()
    {
        // Chain multiple bindings
        textBox1
            .BindText(viewModel, nameof(MyViewModel.Name))
            .BindEnabled(viewModel, nameof(MyViewModel.IsEditable))
            .BindVisible(viewModel, nameof(MyViewModel.IsVisible));

        // Bind checkbox
        checkBox1.BindChecked(viewModel, nameof(MyViewModel.IsSelected));

        // Bind combo box
        comboBox1
            .SetDataSource(categories)
            .BindSelectedItem(viewModel, nameof(MyViewModel.SelectedCategory));

        // Bind numeric up/down
        numericUpDown1
            .BindValue(viewModel, nameof(MyViewModel.Count))
            .BindMinimum(viewModel, nameof(MyViewModel.MinCount))
            .BindMaximum(viewModel, nameof(MyViewModel.MaxCount));
    }
}
Command Binding for Buttons
using BB84.WinForms.Extensions;
using System.Windows.Input;

public class MyViewModel : INotifyPropertyChanged
{
    public ICommand SaveCommand { get; private set; }

    public MyViewModel()
    {
        SaveCommand = new RelayCommand(Save, CanSave);
    }

    private void Save() => /* Save logic */;
    private bool CanSave() => /* Validation logic */;
}

// In the form
saveButton.BindCommand(viewModel.SaveCommand);

Documentation

The complete API documentation can be found here.

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. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.8.1

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.
  • net9.0-windows7.0

    • No dependencies.

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
3.2.930 36 9/30/2025
3.1.916 324 9/16/2025
3.1.831 221 8/31/2025
3.0.817 155 8/17/2025
3.0.722 590 7/22/2025
2.15.710 212 7/10/2025
2.14.613 269 6/13/2025
2.13.530 191 5/30/2025
2.12.523 149 5/23/2025
2.11.518 149 5/18/2025
2.11.409 327 4/9/2025
2.11.323 221 3/23/2025
2.11.322 192 3/22/2025