A newer version of this page is available. Switch to the current version.

TreeListView.FormatConditions Property

Stores conditional formats applied to the TreeListView.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v18.2.dll

Declaration

public FormatConditionCollection FormatConditions { get; }

Property Value

Type Description
FormatConditionCollection

A FormatConditionCollection object that is the collection of conditional formats applied to the grid’s view.

Remarks

The FormatConditions collection stores conditional formatting rules applied to the grid’s view.

The following code sample illustrates how to define a conditional formatting rule in markup. See the How to: Apply Conditional Formatting example to learn more.

<dxg:TreeListView.FormatConditions>
   <dxg:DataBarFormatCondition FieldName="Visits" PredefinedFormatName="GreenGradientDataBar" />
</dxg:TreeListView.FormatConditions>

The code sample below illustrates how to define the same conditional formatting rule in code-behind. See the How to: Apply Conditional Formatting in Code-Behind example to learn more.

var visitsDataBar = new DataBarFormatCondition() {
   FieldName = "Visits",
   PredefinedFormatName = "GreenGradientDataBar"
};
view.FormatConditions.Add(visitsDataBar);

Use the following methods to remove conditional formatting rules:

See Also