avalonia-mvvm

Implements MVVM in Avalonia with ViewModels, INotifyPropertyChanged, and commands.

27|2|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/linuxdevel/Avalonia-skills --skill avalonia-mvvm-linuxdevel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: avalonia-mvvm
Source: https://github.com/linuxdevel/Avalonia-skills/tree/main/skills/avalonia/avalonia-mvvm
Command: npx skills add https://github.com/linuxdevel/Avalonia-skills --skill avalonia-mvvm-linuxdevel

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MVVM in Avalonia provides a clean separation of concerns, enabling testable, maintainable UI code by binding Views to ViewModels and coordinating state and commands.

Core Features & Use Cases

  • ViewModel-first navigation and data binding
  • Supports INotifyPropertyChanged manually or via libraries like CommunityToolkit.Mvvm or ReactiveUI
  • Flexible command patterns using ICommand, RelayCommand, and AsyncRelayCommand
  • Guidance for integrating common MVVM practices in Avalonia apps

Quick Start

Create a new Avalonia MVVM project and wire Views to a ViewModel using INotifyPropertyChanged and RelayCommand/AsyncRelayCommand.

Frequently Asked Questions about avalonia-mvvm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement MVVM in Avalonia for cross-platform apps?

Implement MVVM in Avalonia by binding Views to ViewModels using INotifyPropertyChanged and commands like RelayCommand. This separates UI logic, ensuring testable and maintainable cross-platform code.

Can I use CommunityToolkit.Mvvm or ReactiveUI with Avalonia MVVM?

Yes, Avalonia MVVM supports both CommunityToolkit.Mvvm and ReactiveUI. You can implement INotifyPropertyChanged manually or rely on these libraries for robust ViewModel state coordination.

How does ViewModel-first navigation work in Avalonia?

ViewModel-first navigation in Avalonia coordinates Views by binding them to active ViewModels. This pattern maintains a clean separation of concerns while managing app navigation state.

What is the best way to handle asynchronous commands in Avalonia MVVM?

Handle asynchronous operations in Avalonia MVVM using AsyncRelayCommand. This command pattern binds UI interactions to asynchronous ViewModel methods, enabling responsive cross-platform applications.

When should I use manual INotifyPropertyChanged over an MVVM library in Avalonia?

Use manual INotifyPropertyChanged in Avalonia for lightweight implementations without overhead. Choose a library like CommunityToolkit.Mvvm when you need robust property notifications and command patterns.