BB84.WinForms.Extensions 2.11.409

dotnet add package BB84.WinForms.Extensions --version 2.11.409
                    
NuGet\Install-Package BB84.WinForms.Extensions -Version 2.11.409
                    
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="2.11.409" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BB84.WinForms.Extensions" Version="2.11.409" />
                    
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 2.11.409
                    
#r "nuget: BB84.WinForms.Extensions, 2.11.409"
                    
#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.
#addin nuget:?package=BB84.WinForms.Extensions&version=2.11.409
                    
Install BB84.WinForms.Extensions as a Cake Addin
#tool nuget:?package=BB84.WinForms.Extensions&version=2.11.409
                    
Install BB84.WinForms.Extensions as a Cake Tool

net462 net481 net80 net90

BB84.WinForms.Extensions

A collection of some WinForms extensions I needed in many projects. It consists of some useful control and dialog extension methods.

Usage

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

Bindings

On the 'TextBox', for example, the text, whether the 'TextBox' is active or even whether the 'TextBox' is visible or not can be configured using the extension methods. The same applies to the NumericUpDown control. At a 'ComboBox' control, for example, the data source and the selected item can be bound to a property.

/// <summary>
/// The character form class.
/// </summary>
public partial class CharacterForm : Form
{
	private readonly CharacterViewModel _viewModel;

	/// <summary>
	/// Initializes a new instance of the <see cref="CharacterForm"/> class.
	/// </summary>
	/// <param name="viewModel">The character view model instance to use.</param>
	public CharacterForm(CharacterViewModel viewModel)
	{
		InitializeComponent();

		_viewModel = viewModel;

		FirstNameTextBox.WithTextBinding(_viewModel.Model, nameof(_viewModel.Model.FirstName));
		LastNameTextBox.WithTextBinding(_viewModel.Model, nameof(_viewModel.Model.LastName));
		LevelNumericUpDown.WithValueBinding(_viewModel.Model, nameof(_viewModel.Model.Level));
		
		ExperienceNumericUpDown.WithValueBinding(_viewModel.Model, nameof(_viewModel.Model.Experience))
			.WithEnabledBinding(_viewModel, nameof(_viewModel.CanChangeExperience));
		
		CritterComboBox.WithDataSource(_viewModel.CritterTypes)
			.WithSelectedItemBinding(viewModel.Model, nameof(viewModel.Model.CritterType));
	}
}

This applies to a lot of standard controls.

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. 
.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
2.11.409 115 4/9/2025
2.11.323 151 3/23/2025
2.11.322 144 3/22/2025