Back to Devexpress

IconSetFormat Class

wpf-devexpress-dot-xpf-dot-core-dot-conditionalformatting-28cea44f.md

latest4.3 KB
Original Source

IconSetFormat Class

Contains formatting settings for an Icon Sets conditional format.

Namespace : DevExpress.Xpf.Core.ConditionalFormatting

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public class IconSetFormat :
    IndicatorFormatBase,
    IXtraSupportDeserializeCollectionItem
vb
Public Class IconSetFormat
    Inherits IndicatorFormatBase
    Implements IXtraSupportDeserializeCollectionItem

The following members return IconSetFormat objects:

Remarks

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

The following image shows the icon set formatting.

The code sample below illustrates how to create the icon set conditional formatting rule with a custom format in markup for GridControl. Use the Conditional Formatting Rules Manager to generate this code.

xaml
<dxg:TableView.FormatConditions>
   <dxg:IconSetFormatCondition FieldName="Profit">
      <dx:IconSetFormat ElementThresholdType="Percent" IconSetType="Arrows3">
         <dx:IconSetElement ThresholdComparisonType="GreaterOrEqual" Threshold="70">
            <dx:IconSetElement.Icon>
               <BitmapImage CacheOption="OnLoad" UriSource="pack://application:,,,/DevExpress.Xpf.Core.v17.1;component/Core/ConditionalFormatting/Images/IconSets/Arrows3_1.png" UriCachePolicy="{x:Null}"/>
            </dx:IconSetElement.Icon>
         </dx:IconSetElement>
         <dx:IconSetElement ThresholdComparisonType="GreaterOrEqual" Threshold="30">
            <dx:IconSetElement.Icon>
               <BitmapImage CacheOption="OnLoad" UriSource="pack://application:,,,/DevExpress.Xpf.Core.v17.1;component/Core/ConditionalFormatting/Images/IconSets/Arrows3_2.png" UriCachePolicy="{x:Null}"/>
            </dx:IconSetElement.Icon>
         </dx:IconSetElement>
         <dx:IconSetElement ThresholdComparisonType="GreaterOrEqual" Threshold="0">
            <dx:IconSetElement.Icon>
               <BitmapImage CacheOption="OnLoad" UriSource="pack://application:,,,/DevExpress.Xpf.Core.v17.1;component/Core/ConditionalFormatting/Images/IconSets/Arrows3_3.png" UriCachePolicy="{x:Null}"/>
            </dx:IconSetElement.Icon>
         </dx:IconSetElement>
      </dx:IconSetFormat>
   </dxg:IconSetFormatCondition>
</dxg:TableView.FormatConditions>

Inheritance

Object DispatcherObject DependencyObject Freezable DevExpress.Xpf.Core.ConditionalFormatting.IndicatorFormatBase IconSetFormat IconSetFormat

See Also

IconSetFormat Members

Conditional Formatting

Formatting Values Using Icon Sets

Conditional Formatting

DevExpress.Xpf.Core.ConditionalFormatting Namespace