FormatConditionBase.PredefinedFormatName Property

Gets or sets the name of the predefined format to be applied to the cells. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v21.1.Core.dll


public string PredefinedFormatName { get; set; }

Property Value

Type Description

A String value that is the predefined format name.


The table below presents the collections that store predefined formats.

Conditional Format Predefined Formats Collection
Basic conditional formats TableView.PredefinedFormats (TreeListView.PredefinedFormats)
Data Update TableView.PredefinedFormats (TreeListView.PredefinedFormats)
Icon Sets TableView.PredefinedIconSetFormats (TreeListView.PredefinedIconSetFormats)
Color Scales TableView.PredefinedColorScaleFormats (TreeListView.PredefinedColorScaleFormats)
Data Bars TableView.PredefinedDataBarFormats (TreeListView.PredefinedDataBarFormats)

You cannot modify a predefined format collection. To define a new predefined format, create a new predefined format collection.

The following code sample illustrates how to create a collection of predefined formats in markup:

<dxg:TableView AllowConditionalFormattingMenu="True">
         <dx:FormatInfo FormatName="PurpleFill" DisplayName="Purple Fill">
               <dxg:Format Background="Purple"/>

The code sample below illustrates how to create a collection of predefined formats in code-behind:

FormatInfoCollection predefinedFormats = new FormatInfoCollection();
foreach (FormatInfo formatInfo in view.PredefinedFormats) {
predefinedFormats.Add(new FormatInfo() {
   FormatName = "PurpleFill",
   DisplayName = "Purple Fill",
   Format = new Format() {
      Background = Brushes.Purple
view.PredefinedFormats = predefinedFormats;
See Also