Benday.Presentation
2.1.0
dotnet add package Benday.Presentation --version 2.1.0
NuGet\Install-Package Benday.Presentation -Version 2.1.0
<PackageReference Include="Benday.Presentation" Version="2.1.0" />
<PackageVersion Include="Benday.Presentation" Version="2.1.0" />
<PackageReference Include="Benday.Presentation" />
paket add Benday.Presentation --version 2.1.0
#r "nuget: Benday.Presentation, 2.1.0"
#:package Benday.Presentation@2.1.0
#addin nuget:?package=Benday.Presentation&version=2.1.0
#tool nuget:?package=Benday.Presentation&version=2.1.0
Benday.Presentation - MAUI MVVM Toolkit
MVVM toolkit for .NET MAUI that reduces boilerplate and simplifies data binding.
Written by Benjamin Day Pluralsight Author | Microsoft MVP | Scrum.org Professional Scrum Trainer https://www.benday.com https://www.slidespeaker.ai info@benday.com YouTube: https://www.youtube.com/@_benday
Key Features
- ViewModelField<T> - Wrap form fields with built-in support for labels, validation messages, visibility, and enabled state
- SelectableCollectionViewModel<T> - Observable collections with automatic selection tracking (single or multi-select), drag-and-drop reordering via
Move(), and selection interception viaBeforeSetSelectedItem - MessagingViewModelBase - Display message boxes and dialogs from your ViewModels
- ExceptionHandlingRelayCommand - Commands that catch and display exceptions automatically
- Value Converters - Common converters for MAUI data binding including
VisibleIfNullValueConverterandVisibleIfNotNullValueConverter
Suggestions, Problems, or Bugs?
Got ideas for features you'd like to see? Found a bug? Let us know by submitting an issue https://github.com/benday-inc/mvvm-presentation/issues. Want to contribute? Submit a pull request.
Installing
dotnet add package Benday.Presentation
Quick Start
public class MyViewModel : ViewModelBase
{
public ViewModelField<string> FirstName { get; } = new("First Name");
public ViewModelField<string> LastName { get; } = new("Last Name");
public void Validate()
{
FirstName.IsValid = !string.IsNullOrEmpty(FirstName.Value);
FirstName.ValidationMessage = FirstName.IsValid ? "" : "Required";
}
}
Documentation
Full documentation: https://benday-inc.github.io/mvvm-presentation/
Related Packages
- Benday.Presentation.Controls - Ready-to-use MAUI controls that bind to ViewModelField objects
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-ios26.0 is compatible. net10.0-maccatalyst was computed. net10.0-maccatalyst26.0 is compatible. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- CommunityToolkit.Mvvm (>= 8.4.0)
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-ios26.0
- CommunityToolkit.Mvvm (>= 8.4.0)
- Microsoft.Maui.Controls (>= 10.0.20)
-
net10.0-maccatalyst26.0
- CommunityToolkit.Mvvm (>= 8.4.0)
- Microsoft.Maui.Controls (>= 10.0.20)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Benday.Presentation:
| Package | Downloads |
|---|---|
|
Benday.Presentation.Controls
Ready-to-use .NET MAUI controls for MVVM apps including TextboxField, ComboboxField, ListboxField, and LabelField. Bind entire ViewModelField objects for automatic label, validation, and visibility support. Works with Benday.Presentation toolkit. |
GitHub repositories
This package is not used by any popular GitHub repositories.
v2.1.0 - Enhanced SelectableCollectionViewModel with drag-and-drop support, selection interception, and improved event handling
- OnItemSelected event now includes the selected item via ItemSelectedEventArgs
- Added Move() method and AfterMove event for drag-and-drop reordering
- Added BeforeSetSelectedItem delegate to intercept/cancel selection changes
- Added IgnoreRequestsToSetNullValuesAsSelected property
- Added IndexOf() method
- Added VisibleIfNullValueConverter and VisibleIfNotNullValueConverter
- Added DebuggingTag property to ViewModelBase
- Added FieldTextEditorStyle to Styles.xaml
- Removed Console.WriteLine debug statements
v2.0.0 - .NET 10 support
v1.2.3 - Fixed bug where SelectableCollection was setting the wrong selected item if an item was already selected
v1.2.2 - Fixed bug where SelectableCollection wasn't always subscribing to events on ObservableCollection
v1.2.1 - Fixed stack overflow exception in SelectableCollectionViewModel
v1.2 - Fixed a nasty bug in SelectableCollectionViewModel where the wrong interface was being checked for IsSelected value changes
v1.1 - Multi select list view model
v1.0 - Initial release