wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-26025da9.md
Stores conditional formats applied to the TreeListView.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public FormatConditionCollection FormatConditions { get; }
Public ReadOnly Property FormatConditions As FormatConditionCollection
| Type | Description |
|---|---|
| FormatConditionCollection |
A FormatConditionCollection object that is the collection of conditional formats applied to the grid’s view.
|
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:
<dxg:TreeListView.FormatConditions>
<dxg:DataBarFormatCondition FieldName="Visits" PredefinedFormatName="GreenGradientDataBar" />
</dxg:TreeListView.FormatConditions>
View Example: Apply Conditional Formatting
The code sample below illustrates how to define the same conditional formatting rule in code-behind:
var visitsDataBar = new DataBarFormatCondition() {
FieldName = "Visits",
PredefinedFormatName = "GreenGradientDataBar"
};
view.FormatConditions.Add(visitsDataBar);
Dim visitsDataBar = New DataBarFormatCondition() With {
.FieldName = "Visits",
.PredefinedFormatName = "GreenGradientDataBar"
}
view.FormatConditions.Add(visitsDataBar)
View Example: Apply Conditional Formatting in Code Behind
Use the following methods to remove conditional formatting rules:
See Also
AddFormatCondition(FormatConditionBase)
ClearFormatConditionsFromColumn(ColumnBase)