Refer to the following XtraGrid documentation for more information on this feature:
WinForms Controls > Controls and Libraries > Data Grid > Conditional Formatting
WinForms Controls > Controls and Libraries > Tree List > Conditional Formatting
WinForms Controls > Controls and Libraries > Pivot Grid > Data Analysis > Conditional Formatting
In general, accomplishing this task consists of several independent parts.
1. Enabling, saving and restoring GridFormatRule, TreeListFormatRule or PivotGridFormatRule objects using the standard XtraGrid, XtraTreeList, XtraPivotGrid approaches as per What is the best way to save and restore information just about Conditional Formatting rules in GridControl without using the RestoreLayoutFromXXX and SaveLayoutToXXX methods?
2. Integrating this solution in the GridListEditor, TreeListEditor or PivotGridListEditor (note that this editor requires a small adjustment as per the T348006 thread) using a ViewController as described in the Access Grid Control Properties help topic.
3. Serializing the control's formatting rules information, taking into account the fact that it uses a different mechanism for storing settings, which is based on the Application Model. In XAF, it is best to extend the ListView node with a string property that will hold a serialization representation of formatting rules. Refer to the How to: Extend the Application Model article for more details.
The two attached ViewController files (add them into YourSolutionName.Module.Win project) illustrate how these parts can be accomplished in XAF v15.1.7+ (you might be also required to add the WinForms Tree and Pivot Grid List Editor modules via the Application Designer or Module Designer to allow Visual Studio to automatically add required assembly references).