windowsforms-devexpress-dot-xtraeditors-dot-formatrulebase.md
Gets or sets the style format rule, which defines the condition and appearance settings applied when the condition is true.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue, 1000)]
[DXCategory("Appearance")]
public FormatConditionRuleBase Rule { get; set; }
<XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue, 1000)>
<DXCategory("Appearance")>
Public Property Rule As FormatConditionRuleBase
| Type | Description |
|---|---|
| FormatConditionRuleBase |
The style format rule.
|
Note
A single FormatConditionRuleBase object cannot be shared between multiple FormatRuleBase objects.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Rule property.
Note
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.
winforms-grid-bind-to-business-objects/CS/GridBoundToRuntimeCreatedData/Form1.cs#L43
formatConditionRuleValue.Value1 = DateTime.Today;
gridFormatRule.Rule = formatConditionRuleValue;
gridFormatRule.ApplyToRow = false;
winforms-pivot-grid-apply-format-rules-to-data-cells/CS/WinFormsPivotGridFormatRules/Form1.cs#L20
// Creates a new Rule object and sets its parameters.
newRule.Rule = new FormatConditionRuleDataBar{
PredefinedName = "Yellow Gradient"
winforms-grid-bind-to-business-objects/VB/GridBoundToRuntimeCreatedData/Form1.vb#L45
formatConditionRuleValue.Value1 = Date.Today
gridFormatRule.Rule = formatConditionRuleValue
gridFormatRule.ApplyToRow = False
winforms-pivot-grid-apply-format-rules-to-data-cells/VB/WinFormsPivotGridFormatRules/Form1.vb#L20
' Creates a new Rule object and sets its parameters.
newRule.Rule = New FormatConditionRuleDataBar With {.PredefinedName = "Yellow Gradient"}
' Adds the rule to the collection.
See Also