SkillAgentSearch skills...

Plugin.Maui.DynamicForms

Plugin.Maui.DynamicForms is a .NET MAUI library for building dynamic, metadata-driven forms at runtime—no UI code needed. Supports validation, theming, and cross-platform layouts for fast, flexible form generation

Install / Use

/learn @corweg/Plugin.Maui.DynamicForms
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Plugin.Maui.DynamicForms

.NET MAUI License: MIT NuGet

A powerful .NET MAUI library for building dynamic, metadata-driven forms at runtime - no UI code required!

Build complex, production-ready forms in minutes with full validation, theming, and cross-platform support. Perfect for admin panels, data entry apps, configuration UIs, and any scenario requiring flexible form generation.

Form Styles Showcase


🎯 Why Plugin.Maui.DynamicForms?

Stop writing repetitive UI code. Define your forms once as metadata, and let the library handle the rest - rendering, validation, data binding, and styling.

graph LR
 A[Define Metadata] --> B[DynamicFormView]
 B --> C[Beautiful UI]
 C --> D[Validated Data]
 D --> E[Your Business Logic]
 style B fill:#4CAF50,stroke:#333,stroke-width:2px,color:#fff

✨ Key Features

  • 🚀 Zero UI Code - Build forms from simple metadata definitions
  • 🎨 8 Built-in Themes - Professional styles ready out-of-the-box
  • Enterprise Validation - FluentValidation, DataAnnotations, or custom validators
  • 🔄 Fluent API - Modern FormBuilder for clean, readable code
  • 📱 True Cross-Platform - Android, iOS, Windows, macOS support
  • 🌐 Async-First - Built for modern async/await patterns and API integration
  • 🎯 Type-Safe - Full C# type safety with DTO binding
  • 🔧 Fully Customizable - Every visual aspect can be styled via XAML

1. Install via NuGet

dotnet add package Plugin.Maui.DynamicForms

2. Configure MauiProgram.cs

using CommunityToolkit.Maui;

builder.UseMauiApp<App>()
    .UseMauiCommunityToolkit();  // Required

3. Add Default Styles to App.xaml

<Application xmlns:styles="clr-namespace:Plugin.Maui.DynamicForms.Resources.Styles;assembly=Plugin.Maui.DynamicForms"
             ...>
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <styles:FormStyleDefault />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

4. Use in Your Page

<ContentPage xmlns:forms="clr-namespace:Plugin.Maui.DynamicForms.Controls;assembly=Plugin.Maui.DynamicForms"
             ...>
    <forms:DynamicFormView x:Name="MyFormView" />
</ContentPage>
// Define form structure
var fields = new FormBuilder()
    .BeginBlock("Contact Information")
        .AddTextField("Name").WithRequiredValidation()
        .AddTextField("Email").WithRequiredValidation()
        .AddTextField("Phone")
    .Build();

// Assign to form
MyFormView.FormFields = fields;

// Add Validators
MyFormView.FieldValidators.Add(new RequiredFieldValidator());

// Handle save
MyFormView.FormSaved += (s, e) => {
    var name = e.FormFields.First(f => f.Property == "Name").Value;
    // Process form data...
};

That's it! You now have a fully functional, validated, styled form. 🎉


💡 Perfect For

mindmap
  root((Use Cases))
    Admin Panels
      User Management
      Settings Configuration
      System Setup
    Data Entry
      Customer Forms
      Survey Collection
      Registration Forms
    Dynamic Content
      CMS Forms
      Report Builders
   Filter Interfaces
   LOB Apps
     Employee Records
        Order Entry
        Inventory Management
  • Admin Panels - Quickly build configuration and management interfaces
  • Data Collection Apps - Surveys, registrations, feedback forms
  • Business Applications - Employee records, customer data, order entry
  • Dynamic Workflows - Forms that change based on business rules
  • Rapid Prototyping - Build and iterate on forms in minutes

🎨 Visual Themes

Choose from 8 professionally designed themes, or create your own:

| Theme | Style | Best For | |-------|-------|----------| | Base Styling | Clean & minimal | Production apps | | Modern Dark | Sleek dark mode | Modern UIs | | Pastel Dream | Soft & friendly | Consumer apps | | Ocean Blue | Professional blue | Corporate apps | | Forest Green | Nature-inspired | Eco/outdoor apps | | Sunset Orange | Warm & inviting | Creative apps | | OENext | Custom branded | Enterprise | | Test Styling | Debug-friendly | Development |

Switch themes at runtime with a single line:

Application.Current.Resources.MergedDictionaries.Add(new FormStyleModernDark());
MyForm.RefreshForm();

📊 Architecture Overview

graph TB
    subgraph "Your App"
        A[XAML Page] --> B[DynamicFormView]
        C[Business Logic] --> D[DTO Models]
    end
    
    subgraph "Plugin.Maui.DynamicForms"
        B --> E[FormBuilder]
        E --> F[FieldMetaData]
        F --> G[FormControlFactory]
        G --> H[Rendered Controls]
        I[Validation Engine] --> H
        J[Style Engine] --> H
        D <--> K[FormDataConverter]
        K <--> F
    end
 
    style B fill:#4CAF50,stroke:#333,stroke-width:2px,color:#fff
    style G fill:#2196F3,stroke:#333,stroke-width:2px,color:#fff

🔥 Advanced Features

FluentValidation Integration

public class PersonValidator : AbstractValidator<PersonModel>
{
    public PersonValidator()
    {
        RuleFor(x => x.Email).EmailAddress();
        RuleFor(x => x.Age).InclusiveBetween(18, 100);
    }
}

MyForm.FormValidator = new FluentValidationFormValidator<PersonModel>(new PersonValidator());

Async API Data Loading

var customerData = await apiService.GetCustomerAsync(customerId);
var formFields = FormBuilder.CreateCustomerForm();
formFields = FormDataConverter.Dto2FormData(formFields, customerData);
MyForm.FormFields = formFields;

Multi-Block Forms

var form = new FormBuilder()
 .BeginBlock("Personal Info", isExpanded: true)
        .AddTextField("FirstName")
        .AddTextField("LastName")
    .NextBlock()
    .BeginBlock("Contact Info", isExpanded: false)
        .AddTextField("Email")
        .AddTextField("Phone")
    .Build();

📚 Documentation

| Document | Description | |----------|-------------| | Library Documentation | Complete technical reference, API docs, styling guide | | Sample Application | 9 working examples with code walkthroughs |


🏗️ Project Structure

/
├── src/
│   └── Plugin.Maui.DynamicForms/         # 📦 Main library (NuGet package)
│       ├── Controls/                     # DynamicFormView control
│       ├── Models/                       # FieldMetaData, FieldType
│       ├── Factories/                    # FormBuilder, FormControlFactory
│       ├── Validation/                   # Validation engine & interfaces
│       ├── Helpers/                      # Data converters, utilities
│       └── Documentation/                # Technical docs
│
├── Samples/
│   └── Plugin.Maui.DynamicForms.Sample/  # 📱 Demo application
│       ├── Examples/                     # 9 example forms
│       ├── Resources/Styles/             # 8 theme implementations
│       └── Validation/                   # FluentValidation examples
│
└── README.md     # 👈 You are here

🔧 Requirements

  • .NET 10.0 or higher
  • .NET MAUI 10.0+
  • CommunityToolkit.Maui 12.1.0+
  • Supported Platforms:
    • ✅ Android 21+
    • ✅ iOS 15+
    • ✅ macOS Catalyst 15+
    • ✅ Windows 10 (10.0.17763.0+)

🎓 Learn by Example

The Sample Application includes 9 complete examples:

  1. Example Form - FluentValidation showcase
  2. Address Form - Multi-block with dual data binding
  3. Contact Form - Simple starter example
  4. Registration Form - Password confirmation, T&C
  5. Employee Form - Complex multi-section business form
  6. Event Registration - Radio groups, date/time pickers
  7. Feedback Form - Text areas, ratings
  8. Survey Form - Multi-topic questionnaire
  9. Customer Form - Async API data loading

Each example includes:

  • ✅ Full source code with comments
  • ✅ Working validation
  • ✅ DTO binding examples
  • ✅ Best practices demonstrated

👋 About us

We are Ralf Corinth and Torsten Weggen — lifelong software developers and innovators with a passion for building systems that last.

About Ralf

  • 🎓 Studied Mechanical Engineering with a focus on Production Technology in Lübeck (1978–1981).
  • 💻 Developed early software for analyzing electric motor measurements as part of his thesis.
  • 🏢 Led software development at Philips until 1989, experiencing the evolution from punch cards to large-scale data systems.
  • 🚀 Founded his own company in 1989, introducing ERP systems and later creating O&E, an integrated CRM/ERP solution.
  • 🌟 Inventor of the SML (SachMerkmalLeiste), a flexible way to document machine-specific attributes, later extended to all kinds of products and data.
  • 🔧 Today, even in retirement, Ralf continues to innovate with .NET MAUI and the Dynamic Data Form (DDF), enabling adaptive, beautiful forms across devices.

About Torsten

  • 💡 Fullstack Software developer by heart and soul, with decades of experience in enterprise systems and open-source projects.
  • 🏢 Currently part of Hannover Rück-Gruppe, with a background in building scalable solutions and contributing to the developer community.
  • 📚 Author of Auktionsbuddy 4.0, a comprehensive eBay auction management tool.
  • 🏆 Recognized as a DNN MVP multiple times (2013–2018) for contributions to the DotNetNuke e

Related Skills

View on GitHub
GitHub Stars7
CategoryCustomer
Updated4mo ago
Forks2

Languages

C#

Security Score

82/100

Audited on Nov 25, 2025

No findings