BB84.WinForms.Extensions
3.2.930
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Framework 4.6.2
This package targets .NET Framework 4.6.2. The package is compatible with this framework or higher.
dotnet add package BB84.WinForms.Extensions --version 3.2.930
NuGet\Install-Package BB84.WinForms.Extensions -Version 3.2.930
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.2.930" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BB84.WinForms.Extensions" Version="3.2.930" />
<PackageReference Include="BB84.WinForms.Extensions" />
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.2.930
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BB84.WinForms.Extensions, 3.2.930"
#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.2.930
#: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.2.930
#tool nuget:?package=BB84.WinForms.Extensions&version=3.2.930
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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 | 33 | 9/30/2025 |
3.1.916 | 313 | 9/16/2025 |
3.1.831 | 210 | 8/31/2025 |
3.0.817 | 145 | 8/17/2025 |
3.0.722 | 580 | 7/22/2025 |
2.15.710 | 202 | 7/10/2025 |
2.14.613 | 259 | 6/13/2025 |
2.13.530 | 181 | 5/30/2025 |
2.12.523 | 135 | 5/23/2025 |
2.11.518 | 137 | 5/18/2025 |
2.11.409 | 317 | 4/9/2025 |
2.11.323 | 211 | 3/23/2025 |
2.11.322 | 182 | 3/22/2025 |