[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.PageReportModel.Style.Merge

Merge Method

Merge(Style, Style)

Merges a specified report item style with an external style from a stylesheet.

Declaration
public static Style Merge(Style local, Style external)
Parameters
Type Name Description
Style local

A Style object of the report element.

Style external

An external Style object obtained from the stylesheet. If this parameter is null, the default style will be used.

Returns
Type Description
Style

A Style object representing the merged style.

Examples

An example of how to merge with the default style:

Style style = new Style { BackgroundColor = "White" };
Style newStyle = Style.Merge(style, null);

An example of how to merge with the different style:

TextBox textBox = new TextBox();
textBox.Style.TextAlign = TextAlign.Justify;

Style style = new Style { BackgroundColor = "Red" };

Style newStyle = Style.Merge(textBox.Style, style);