Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

FormattingRule.ApplyStyle(XRControlStyle) Method

Copies the appearance from the specified style and applies it to the rule’s FormattingRule.Formatting object.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.Core

#Declaration

public void ApplyStyle(
    XRControlStyle style
)

#Parameters

Name Type Description
style XRControlStyle

An XRControlStyle object, containing the appearance to copy from.

#Remarks

The ApplyStyle method copies all the values of a style’s appearance properties (e.g. BackColor, Font, ForeColor) to the corresponding properties of a Formatting object, which is returned by the FormattingRule.Formatting property of the current rule.

This may be required if your report already contains several styles in its XtraReport.StyleSheet collection, and you want to conditionally apply these styles to report controls or bands.

See Also