dotnet-wpf-mvvm

Implement MVVM patterns in WPF with DevExpress MVVM, Autofac, and Rx.NET.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/Muhomorik/KanelBulleKapital --skill dotnet-wpf-mvvm-muhomorik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-wpf-mvvm
Source: https://github.com/Muhomorik/KanelBulleKapital/tree/main/.claude/skills/dotnet-wpf-mvvm
Command: npx skills add https://github.com/Muhomorik/KanelBulleKapital --skill dotnet-wpf-mvvm-muhomorik

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

WPF desktop applications benefit from a structured MVVM approach; this Skill provides a comprehensive blueprint for implementing Model-View-ViewModel patterns with DevExpress MVVM, Autofac DI, and Rx.NET, enabling scalable, testable UIs.

Core Features & Use Cases

  • Provides design-time/runtime lifecycle guidance with dedicated hooks and DI-friendly constructors.
  • Shows typical ViewModel, Command, and data-binding patterns, including Rx-based subscriptions and disposable management.
  • Demonstrates how to wire up DI, window lifecycle, and design-time support for maintainable WPF apps.

Quick Start

Create a minimal WPF MVVM project skeleton using the canonical design-time and runtime constructors, then wire a MainViewModel with a simple LoadedCommand and a sample bindable property.

Frequently Asked Questions about dotnet-wpf-mvvm

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

FAQPage Schema
How do I implement MVVM patterns in WPF with dependency injection?

Implementing MVVM patterns in WPF with dependency injection requires a parameterized runtime constructor for DI and a separate design-time parameterless constructor. This approach streamlines ViewModel wiring using Autofac, enabling scalable and testable UI layers across desktop applications.

How do I manage Rx.NET subscriptions in a WPF ViewModel?

Manage Rx.NET subscriptions in a WPF ViewModel by utilizing CompositeDisposable for proper IDisposable cleanup. This pattern ensures reactive extensions are correctly disposed during the window lifecycle, preventing memory leaks in your desktop application's UI layer.

Does DevExpress MVVM support design-time data in WPF applications?

DevExpress MVVM supports design-time data in WPF applications through dedicated lifecycle hooks like OnInitializeInDesignMode. Combined with a parameterless design-time constructor, this enables proper UI visualization and maintainable ViewModel structuring during development.

What is the best way to structure ViewModels for testable WPF apps?

Structuring ViewModels for testable WPF apps is best achieved through defined architecture patterns using DevExpress MVVM and Autofac DI. This blueprint enforces lifecycle separation with OnInitializeInDesignMode and OnInitializeRuntime hooks, ensuring components remain scalable and isolated.

How do I handle window lifecycle hooks in a WPF MVVM architecture?

Handle window lifecycle hooks in a WPF MVVM architecture by implementing dedicated OnInitializeInDesignMode and OnInitializeRuntime methods. These lifecycle hooks integrate with dependency injection to manage initialization and IDisposable cleanup for maintainable UI components.

Can I use Autofac dependency injection with WPF MVVM ViewModels?

You can use Autofac dependency injection with WPF MVVM ViewModels by providing a parameterized runtime constructor for service resolution. This DI integration works alongside DevExpress MVVM patterns to deliver scalable and testable desktop application architecture.