ZennoTableStyle

Assembly: ZennoLab.InterfacesLibrary
Full name: ZennoLab.InterfacesLibrary.ProjectModel.ZennoTableStyle


Contains information about excel cell style.

This class can be used in action OwnCode (C# or PHP) of ProjectMaker.

Constructor

ZennoTableStyle()

Method

Default style constructor.

Example

var style = new ZennoTableStyle
            {
                HorizontalAlignment = InterfacesLibrary.Enums.Table.ExcelStyle.HorizontalAlignment.Right,
                VerticalAlignment = InterfacesLibrary.Enums.Table.ExcelStyle.VerticalAlignment.Bottom,
                Font = new Font("Comic Sans MS", 20, FontStyle.Italic | FontStyle.Underline, GraphicsUnit.Point),
                FontColor = Color.Red
            };

Properties

Borders

Property

Gets border style enumerable.

HorizontalAlignment

Property

Get or set cell horizontal alignment.

VerticalAlignment

Property

Get or set cell vertical alignment.

NumberFormat

Property

Get or set number format.

Font

Property

Get or set font.

FontColor

Property

Get or set font color.

WrapText

Property

Get or set text wraped.

Methods

SetBorder

Method

Set border style.

Parameters

ПараметрОписание
borderBorder style.

Example

var style = new ZennoTableStyle();
            var border = InterfacesLibrary.ProjectModel.ZennoTableStyle.Border.CreateBorder(InterfacesLibrary.Enums.Table.ExcelStyle.Borders.Right | InterfacesLibrary.Enums.Table.ExcelStyle.Borders.DiagonalUp, Color.Blue, InterfacesLibrary.Enums.Table.ExcelStyle.LineStyle.DashDot);
            style.SetBorder(border);

ClearBorders

Method

Clear border style.

RemoveBorder

Method

Remove border style by position.

Parameters

ПараметрОписание
positionBorder position.

SetBorder

Method

Set border style.

Parameters

ПараметрОписание
positionBorder position.
colorThe border color.
lineStyleBorder line style.

Example

var style = new ZennoTableStyle();
            style.SetBorder(InterfacesLibrary.Enums.Table.ExcelStyle.Borders.Right | InterfacesLibrary.Enums.Table.ExcelStyle.Borders.DiagonalUp, Color.Blue, InterfacesLibrary.Enums.Table.ExcelStyle.LineStyle.DashDot);