Conditional Appearance (Data Driven)

NuGet Package Details

Package Name

Llamachant.ExpressApp.ConditionalAppearance

XPO

Llamachant.ExpressApp.ConditionalAppearance.Xpo

EF Core

Llamachant.ExpressApp.ConditionalAppearance.EF

Overview

The Conditional Appearance module extends the standard DevExpress XAF appearance functionality by enabling users to define appearance rules at runtime and persist them in the database. This allows for dynamic control over UI customization such as setting visibility, enabling/disabling controls, or applying styles based on business logic conditions, without requiring a code change or redeployment. Rules can be created, edited, and managed through the application itself, offering flexible, user-driven customization.

TIP:

This module requires the XPO or EF specific module to be added to your solution to function.

Installation

Step 1: Install the Module

Install the relevant ORM-specific module:

Install-Package 'Llamachant.ExpressApp.ConditionalAppearance.Xpo'
Install-Package 'Llamachant.ExpressApp.ConditionalAppearance.EF'

Step 2: Register the Module

Register the relevant ORM-specific module (either Xpo or EF Core):

Module.cs
public override void Setup(XafApplication application) {
    base.Setup(application);
    // Xpo:
    this.RequiredModuleTypes.Add(typeof(LlamachantFrameworkConditionalAppearanceModuleXpo));
    // EF Core:
    this.RequiredModuleTypes.Add(typeof(LlamachantFrameworkConditionalAppearanceModuleEF));
}

OR

Startup.cs
services.AddXaf(Configuration, builder => {
    builder.UseApplication<ExpressAppBlazorApplication>();
    builder.Modules
        // Xpo:
        .AddLlamachantFrameworkConditionalAppearanceModuleXpo();
        // EF Core:
        .AddLlamachantFrameworkConditionalAppearanceModuleEF();
});

Step 3: Create Appearance Rules

Once the module is installed and registered, you can create new Appearance Rules at runtime.

Appearance Rule Example

Auto Incrementing IDs
Diagnostics