Skip to main content

DataBarFormat Class

Contains formatting settings for a Data Bars conditional format.

Namespace: DevExpress.Xpf.Core.ConditionalFormatting

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public class DataBarFormat :
    IndicatorFormatBase

The following members return DataBarFormat objects:

Remarks

The DataBarFormat class instances are used to set the GridControl’s DataBarFormatCondition.Format and PivotGridControl’s DataBarFormatCondition.Format properties.

The following image shows the data bar formatting.

CFdatabars.png

The code sample below illustrates how to create the data bar conditional formatting rule with a custom format in markup for GridControl.

<dxg:TableView.FormatConditions>
   <dxg:DataBarFormatCondition FieldName="SalesVsTarget">
      <dx:DataBarFormat FillNegative="Blue" Fill="Red" ZeroLineBrush="Black" />
   </dxg:DataBarFormatCondition>
</dxg:TableView.FormatConditions>

The code sample below illustrates how to define the same conditional formatting rule in code-behind for GridControl.

var salesVsTargetFormatCondition = new DataBarFormatCondition() {
   FieldName = "SalesVsTarget",
   Format = new DataBarFormat() {
      FillNegative = Brushes.Blue,
      Fill = Brushes.Red,
      ZeroLineBrush = Brushes.Black
   }
};
view.FormatConditions.Add(salesVsTargetFormatCondition);

Inheritance

Object
DispatcherObject
DependencyObject
Freezable
DevExpress.Xpf.Core.ConditionalFormatting.IndicatorFormatBase
DataBarFormat
See Also