New to Telerik ReportingStart a free 30-day trial

Style

Class

Represents the style of a report item.

Definition

Namespace:Telerik.Reporting.Drawing

Assembly:Telerik.Reporting.dll

Syntax:

C#
[TypeConverter(typeof(ExpandableObjectConverter))]
public class Style

Inheritance: objectStyle

Properties

Gets or sets the background color of the report item.

C#
public Color BackgroundColor { get; set; }
Property Value:

A Color that represents the background color of the report item. The default is Empty, which indicates that this property is not set.

Remarks:

Use the BackgroundColor property to specify the background color of the report item. This property is set using a Color object.

Gets a BackgroundImage object that controls the image displayed in the background of the report item.

C#
public BackgroundImage BackgroundImage { get; }
Property Value:

An BackgroundImage that represents the image to display in the background of the report item. Report items have no background image by default.

Gets a BorderColor object used to define the border color of a report item.

C#
public BorderColor BorderColor { get; }
Property Value:

A BorderColor representing the border color of the report item.

Remarks:

You can set the border color of the item by using the properties Default, Left, Right, Top, and Bottom. The Default property is used to set all borders colors at once. All borders are Black by default.

Gets a BorderStyle object used to define the border style of a report item.

C#
public BorderStyle BorderStyle { get; }
Property Value:

A BorderStyle representing the border style of the report item.

Remarks:

You can set the border style of the item by using the properties Default, Left, Right, Top, and Bottom. The Default property is used to set all borders styles at once. All borders are BorderType.None by default.

Gets a BorderWidth object used to define the border width of a report item.

C#
public BorderWidth BorderWidth { get; }
Property Value:

A BorderWidth representing the border width of the report item.

Remarks:

You can set the border width of the item by using the properties Default, Left, Right, Top, and Bottom. The Default property is used to set all borders widths at once. All borders are 1pt wide by default.

Color

Color

Gets or sets the foreground color of the report item.

C#
public Color Color { get; set; }
Property Value:

The foreground Color of the report item. The default is Black.

Gets a Font object representing the font of the report item.

C#
public Font Font { get; }
Property Value:

A Font object used to define the font of a report item. By default the font of a report item is Arial-Regular, 10pts.

Gets or sets the Color (stroke) representing the line color of report items that support it, such as lines and shapes.

C#
[AIAssistantDescription("Line stroke/border color. For LineSeries: the color of the connecting line. Color formats: named ('Red'), hex ('#FF0000'), or RGB ('255, 0, 0'). Default: Black.")]
public Color LineColor { get; set; }
Property Value:

A Color value representing the line color of the report item. By default its value is Black.

Gets or sets a LineStyle object used to define the line style of report items that support it, such as lines and shapes.

C#
public LineStyle LineStyle { get; set; }
Property Value:

A LineStyle object representing the line style of the report item. By default the line style is LineStyle.Solid.

Gets or sets a Unit representing the line width of report items that support it, such as lines and shapes.

C#
[AIAssistantDescription("Line stroke thickness. For LineSeries: the visual width of the connecting line — '3px' is noticeably thicker than the default '1pt'; '5px' is bold. Also controls border width on shapes and gauge elements. Unit string format: '3px', '2pt', '1mm'. Bare '0' removes the stroke.")]
public Unit LineWidth { get; set; }
Property Value:

A Unit value representing the line width of the report item. By default the width is 1pt.

Gets a Padding object used to define the padding of a report item.

C#
public Padding Padding { get; }
Property Value:

A Padding object representing the padding of the report item.

Remarks:

You can set the padding of the item by using the properties Left, Right, Top, and Bottom. Padding on all sides is Zero by default.

Gets or sets the horizontal alignment of text in the report item.

C#
public HorizontalAlign TextAlign { get; set; }
Property Value:

One of the HorizontalAlign values. The default is HorizontalAlign.Left.

Gets or sets the vertical alignment of text in the report item.

C#
public VerticalAlign VerticalAlign { get; set; }
Property Value:

One of the VerticalAlign values. The default is VerticalAlign.Top.

Gets or sets a value indicating whether the report item is displayed.

C#
public bool Visible { get; set; }
Property Value:

true if the report item is displayed; otherwise, false. The default is true.

Methods

Internal use only

C#
public override string ToString()
Returns:

string

Overrides: object.ToString()