WinForms.NullableBinding 1.1.5

There is a newer version of this package available.
See the version list below for details.
dotnet add package WinForms.NullableBinding --version 1.1.5                
NuGet\Install-Package WinForms.NullableBinding -Version 1.1.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="WinForms.NullableBinding" Version="1.1.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WinForms.NullableBinding --version 1.1.5                
#r "nuget: WinForms.NullableBinding, 1.1.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.
// Install WinForms.NullableBinding as a Cake Addin
#addin nuget:?package=WinForms.NullableBinding&version=1.1.5

// Install WinForms.NullableBinding as a Cake Tool
#tool nuget:?package=WinForms.NullableBinding&version=1.1.5                

WinForms.NullableBinding

This C# helper library provides an easy way to add nullable data binding support to WinForms applications, particularly when using DevExpress controls. It simplifies data binding setup by offering strongly typed data binding expressions.

Features

  • Strongly Typed Expressions: Avoid the risk of typos in your data binding expressions and gain the benefits of compile-time checks and IntelliSense autocompletion in your IDE.
  • Nullable Data Binding: This library supports standard data binding, but more importantly, it allows for null values to be assigned to and retrieved from the bound data member.

Usage Example

Traditional approach to adding a data binding:

txtTotal.DataBindings.Add(nameof(txtTotal.Text), _bindingSource, nameof(_transaction.Total), true, DataSourceUpdateMode.OnPropertyChanged);

With WinForms.NullableBinding, you can add a data binding in a strongly typed and potentially nullable way:

using WinForms.NullableBinding;

var obj = new Order
{
  Code = "OrderCode",
  Total = 100.00
};

var bindingSource = new BindingSourceGeneric<Order>(obj);

txtTotal.AddDataBinding(bindingSource, a => a.Total);

How to Use

Simply include the provided extension methods in your project, and make sure to import the corresponding namespace in your code files. You can then use the AddDataBinding and AddNullableDataBinding extension methods for data binding in place of traditional string-based methods.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

    • 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
1.1.6 178 9/20/2023
1.1.5 182 7/26/2023
1.1.1 145 6/8/2023
1.1.0 157 6/7/2023
1.0.0 153 6/7/2023