avalonia-data-binding

Implement data binding in Avalonia MVVM apps with ObservableProperty and RelayCommand.

2|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/Abdssamie/Quater --skill avalonia-data-binding
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: avalonia-data-binding
Source: https://github.com/Abdssamie/Quater/tree/main/.opencode/skills/avalonia-data-binding
Command: npx skills add https://github.com/Abdssamie/Quater --skill avalonia-data-binding

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers implement robust data binding in Avalonia MVVM applications, enabling UI to reflect model state changes automatically.

Core Features & Use Cases

  • ObservableProperty-based properties that notify the UI on change.
  • RelayCommand-driven user interactions and async command patterns.
  • DataTemplates and navigation patterns that map ViewModels to Views for clean UI architecture.
  • Guidance on dependency injection for injecting services into ViewModels to improve testability and modularity.

Quick Start

Prompt: Generate a minimal Avalonia MVVM sample with an observable UserName property, bound TextBox, and a RelayCommand that updates UserName.

Frequently Asked Questions about avalonia-data-binding

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

FAQPage Schema
How do I implement data binding in an Avalonia MVVM application?

To implement data binding in Avalonia MVVM, you use ObservableProperty patterns to notify the UI of state changes and bind View controls directly to ViewModel properties to automatically reflect model state updates.

What is the best way to bind a TextBox to a ViewModel property in Avalonia?

The best way to bind a TextBox in Avalonia is creating an observable property in your ViewModel and linking it via XAML binding, ensuring the UI automatically updates when the property value changes.

How do I use RelayCommand for user interactions in Avalonia?

RelayCommand in Avalonia drives user interactions by binding UI events like button clicks to ViewModel methods, supporting both synchronous and async command patterns to execute UI logic.

How do I map ViewModels to Views using DataTemplates in Avalonia?

DataTemplates map ViewModels to Views in Avalonia by defining specific UI layouts for different ViewModel types, enabling clean UI architecture and seamless navigation between application states.

Can I use dependency injection with ViewModels in Avalonia MVVM?

Yes, you can use dependency injection in Avalonia MVVM to inject services directly into ViewModels, which improves application testability and maintains modular UI architecture.

Why is my Avalonia UI not updating when the ViewModel property changes?

Avalonia UI fails to update when properties lack observable notifications, requiring proper ObservableProperty implementation to ensure the binding engine receives and reflects state change events.