Back to Devexpress

Highlight Property Editors

expressappframework-404205-getting-started-in-depth-tutorial-blazor-enable-additional-modules-highlight-list-view-objects.md

latest2.2 KB
Original Source

Highlight Property Editors

  • Jun 03, 2025
  • 3 minutes to read

This lesson explains how to format data that satisfies the specified criteria.

The instructions below show how to do the following:

  • Add the Conditional Appearance module to the application.
  • Highlight the DemoTask objects whose Status property is not set to Completed.
  • Highlight the Priority property when it contains the High value.

Step-by-Step Instructions

  1. Add the DevExpress.ExpressApp.ConditionalAppearance NuGet package to the MySolution.Module project. See the following topic for more information on how to install DevExpress NuGet packages: Choose Between Offline and Online DevExpress NuGet Feeds.

  2. In the MySolution.Module project, open the Module.cs file and add the Conditional Appearance module:

  3. Open the DemoTask class and apply the AppearanceAttribute attribute as displayed in the code sample below:

  4. Apply the AppearanceAttribute attribute to the Priority property of the DemoTask class. As the first positional parameter, specify the Appearance Rule identifier (e.g., PriorityBackColorPink). Then, specify other parameters.

  5. Run the application. The DemoTask List View and Detail View display a conditional appearance:

Note

You can access these appearance rules from the Model Editor. Open the Model.DesignedDiffs.xafml file and navigate to the BOModel | DemoTask | AppearanceRules node. This node has two child nodes: FontColorRed and PriorityBackColorPink. XAF generates them automatically from the Appearance attributes applied to the DemoTask class and the DemoTask.Priority property. To create a new appearance rule in the Model Editor, add a child node to the AppearanceRules node.

Next Lesson

Attach Files to Objects