FormatConditionRuleDataUpdate.Icon Property
Allows you to display a custom image or a predefined icon.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
[XtraSerializableProperty(XtraSerializationVisibility.Content)]
[DXCategory("Appearance")]
public FormatConditionIcon Icon { get; }
Property Value
Type | Description |
---|---|
DevExpress.XtraEditors.FormatConditionIcon | An object that specifies an icon or image for the format. |
Remarks
The Format Rules designer allows you to customize the Icon property at design time.
Use the Icon.Icon property to specify a custom image. Use the Icon.PredefinedName property to choose from predefined glyphs.
Example
This example uses a FormatConditionRuleDataUpdate format to temporarily highlight cells when their values increase. The highlight effect includes a custom background color and icon.
XtraGrid.GridFormatRule gridFormatRule = new DevExpress.XtraGrid.GridFormatRule();
DevExpress.XtraEditors.FormatConditionRuleDataUpdate formatConditionRuleDataUpdate = new DevExpress.XtraEditors.FormatConditionRuleDataUpdate();
gridFormatRule.Column = gridView1.Columns["Change"];
gridFormatRule.Name = "Format1";
formatConditionRuleDataUpdate.HighlightTime = 500;
formatConditionRuleDataUpdate.Icon.PredefinedName = "Flags3_1.png";
formatConditionRuleDataUpdate.PredefinedName = "Green Fill";
formatConditionRuleDataUpdate.Trigger = FormatConditionDataUpdateTrigger.ValueIncreased;
gridFormatRule.Rule = formatConditionRuleDataUpdate;
gridView1.FormatRules.Add(gridFormatRule);
See Also