Skip to main content

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.v24.1.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core


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;

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PredefinedFormatName property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also