maui-patterns

Provide .NET MAUI reference patterns for MVVM, Shell navigation, and Dependency Injection.

2|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/dimsour/dotnet-ai-toolkit --skill maui-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: maui-patterns
Source: https://github.com/dimsour/dotnet-ai-toolkit/tree/main/plugins/dotnet-copilot/skills/maui-patterns
Command: npx skills add https://github.com/dimsour/dotnet-ai-toolkit --skill maui-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill unit provides .NET MAUI developers with pre-defined patterns for MVVM, Shell navigation, Dependency Injection, and more, helping to avoid common pitfalls and accelerate development.

Core Features & Use Cases

  • MVVM Implementation: Offers a reference for implementing MVVM patterns using CommunityToolkit.Mvvm.
  • Shell Navigation: Demonstrates Shell navigation and routing for building user-friendly UIs.
  • Dependency Injection: Provides guidance on using Dependency Injection for structuring application services.
  • Platform Services: Includes platform-specific implementations for services like photo picking and storage.
  • Data Binding: Illustrates data binding techniques with ObservableCollection and RelayCommand.
  • Use Case: When starting a new MAUI project, use this skill to set up the project with best practices and patterns for MAUI development.

Quick Start

Set up a new MAUI application using the provided MauiProgram.cs template and follow the MVVM pattern with the OrdersViewModel example.

Frequently Asked Questions about maui-patterns

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

FAQPage Schema
How do I implement MVVM in a .NET MAUI application?

To set up Shell navigation in .NET MAUI, define routes in your Shell hierarchy and use URI-based routing to navigate between pages. This Skill demonstrates Shell navigation patterns and routing techniques to build user-friendly cross-platform UIs with structured page hierarchies.

What is the best way to structure Dependency Injection for platform services in .NET MAUI?

The best way to structure Dependency Injection in .NET MAUI is to register application services in the MauiProgram.cs file. This Skill provides reference patterns for injecting platform-specific implementations, such as photo picking and storage services, ensuring loose coupling across your cross-platform application.

Can I use this MAUI Skill to set up a new cross-platform project with best practices?

Yes, you can use this Skill to set up a new MAUI project with best practices by starting with the provided MauiProgram.cs template. It helps developers avoid common architectural pitfalls by applying pre-defined patterns for MVVM, Shell navigation, and Dependency Injection during project initialization.

Does .NET MAUI Shell navigation support data binding with ObservableCollection?

Yes, .NET MAUI Shell navigation fully supports data binding with ObservableCollection. This Skill illustrates data binding techniques to dynamically update UI elements and integrates them with Shell routing and RelayCommand to handle user interactions within the MVVM pattern.

Why do I need platform-specific service implementations for photo picking in .NET MAUI?

You need platform-specific service implementations for photo picking in .NET MAUI because accessing device hardware requires native API calls. This Skill includes reference patterns for abstracting these services using Dependency Injection, allowing shared UI code to interact with native photo picking and storage features seamlessly.