xaf-conditional-appearance

Configure XAF UI rules with [Appearance] attributes and Criteria syntax.

6|2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/kashiash/xaf-skills --skill xaf-conditional-appearance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xaf-conditional-appearance
Source: https://github.com/kashiash/xaf-skills/tree/main/xaf-conditional-appearance
Command: npx skills add https://github.com/kashiash/xaf-skills --skill xaf-conditional-appearance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

XAF developers often need to tailor the UI without writing controllers. Conditional Appearance provides a declarative mechanism to show or hide controls, enable or disable fields, and apply colors or styles based on business rules.

Core Features & Use Cases

  • Appearance attribute with all parameters (Criteria, TargetItems, Context, AppearanceItemType, Visibility, Enabled, FontColor, BackColor, FontStyle, CSS) to declaratively drive UI behavior on classes or properties.
  • Multiple rules and priorities to resolve conflicts and apply the highest-priority rule when conditions overlap.
  • Dynamic appearance from code via IAppearanceEnabled/IAppearanceVisibility to modify UI at runtime.
  • Model-based rules using the Application Model editor for non-code configuration and end-user customization.

Quick Start

Annotate your classes or properties with the Appearance attribute to conditionally hide, disable, or style UI elements.

Frequently Asked Questions about xaf-conditional-appearance

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

FAQPage Schema
How do I conditionally hide or disable fields in a DevExpress XAF application without writing controllers?

Use the XAF Conditional Appearance module to declaratively hide or disable fields by applying the [Appearance] attribute to classes or properties with Criteria syntax, bypassing the need for custom controllers. This drives UI behavior directly from business rules.

What is the Criteria syntax used for in XAF Conditional Appearance rules?

Criteria syntax in XAF Conditional Appearance defines the business rule conditions that trigger UI changes. It evaluates expressions on your object properties to determine when to apply visibility, enablement, or styling modifications.

How do I resolve conflicts when multiple Conditional Appearance rules apply to the same XAF property?

XAF Conditional Appearance resolves overlapping rules by assigning priorities to each rule. When multiple conditions are met simultaneously, the framework applies the rule with the highest priority to determine the final UI state.

Can I configure XAF Conditional Appearance rules without modifying source code?

Yes, you can configure appearance rules non-programmatically using the Application Model editor. This model-based approach allows for runtime UI customization and end-user configuration without touching the underlying codebase.

How do I change XAF UI colors and fonts dynamically based on business logic?

Apply the XAF [Appearance] attribute to properties or classes to dynamically set FontColor, BackColor, FontStyle, and CSS based on criteria. This declaratively styles detail and list views when business conditions are met.

When should I use IAppearanceEnabled and IAppearanceVisibility interfaces in XAF?

Implement the IAppearanceEnabled and IAppearanceVisibility interfaces when you need to drive dynamic appearance behavior from code at runtime. These interfaces allow explicit modification of UI visibility and enablement beyond declarative attribute rules.