Neuro.AppToolkit.Mvvm
0.1.0-preview.2
dotnet add package Neuro.AppToolkit.Mvvm --version 0.1.0-preview.2
NuGet\Install-Package Neuro.AppToolkit.Mvvm -Version 0.1.0-preview.2
<PackageReference Include="Neuro.AppToolkit.Mvvm" Version="0.1.0-preview.2" />
<PackageVersion Include="Neuro.AppToolkit.Mvvm" Version="0.1.0-preview.2" />
<PackageReference Include="Neuro.AppToolkit.Mvvm" />
paket add Neuro.AppToolkit.Mvvm --version 0.1.0-preview.2
#r "nuget: Neuro.AppToolkit.Mvvm, 0.1.0-preview.2"
#:package Neuro.AppToolkit.Mvvm@0.1.0-preview.2
#addin nuget:?package=Neuro.AppToolkit.Mvvm&version=0.1.0-preview.2&prerelease
#tool nuget:?package=Neuro.AppToolkit.Mvvm&version=0.1.0-preview.2&prerelease
Neuro.AppToolkit.Mvvm
MVVM building blocks for any .NET app. It doesn't depend on MAUI, so it works with MAUI, WPF, WinUI, Avalonia and tests alike.
BindableTask
BindableTask<TResult> wraps a TaskObserver from Neuro.AppToolkit.Resilience for data binding. It exposes the observer's snapshots as bindable properties, Run, Refresh and Cancel commands and typed Start, RunAsync, Refresh, Cancel and Reset methods, and it raises every change on the UI thread. BindableTask<TArg, TResult> does the same for work that takes an argument.
public sealed class ContactsViewModel
{
public ContactsViewModel(IContactsApi Api)
{
this.Contacts = BindableTask.Create(
Run => Api.GetContactsAsync(Run.CancellationToken),
new TaskObserverOptions { Name = "load-contacts", Pipeline = ResiliencePresets.Network });
this.Contacts.Start();
}
public BindableTask<Contact[]> Contacts { get; }
}
<ActivityIndicator IsRunning="{Binding Contacts.IsRunning}" />
<CollectionView ItemsSource="{Binding Contacts.Result}" />
<Label IsVisible="{Binding Contacts.IsOffline}" Text="You're offline. Showing saved contacts." />
<Button Command="{Binding Contacts.RefreshCommand}" Text="Refresh" />
See the BindableTask guide for the properties, commands, dispatching and arguments.
| 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-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Neuro.AppToolkit.Resilience (>= 0.1.0-preview.2)
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 |
|---|---|---|
| 0.1.0-preview.2 | 78 | 10/28/2026 |