ZennoTableStyle

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


Contains information about excel cell style.

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

Constructor

ZennoTableStyle()

Constructor

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

IEnumerable<Border> Borders { get; }

Gets border style enumerable.

HorizontalAlignment

Property

HorizontalAlignment HorizontalAlignment { get; set; }

Get or set cell horizontal alignment.

VerticalAlignment

Property

VerticalAlignment VerticalAlignment { get; set; }

Get or set cell vertical alignment.

NumberFormat

Property

string NumberFormat { get; set; }

Get or set number format.

Font

Property

Font Font { get; set; }

Get or set font.

FontColor

Property

Color FontColor { get; set; }

Get or set font color.

WrapText

Property

bool WrapText { get; set; }

Get or set text wraped.

Methods

SetBorder

Method

void SetBorder(Border border)

Parameters

TypeNameDescription
Borderborder

ClearBorders

Method

void ClearBorders()

Clear border style.

RemoveBorder

Method

void RemoveBorder(Borders position)

Remove border style by position.

Parameters

TypeNameDescription
BorderspositionBorder position.

SetBorder

Method

void SetBorder(Borders position, Color color, LineStyle lineStyle)

Set border style.

Parameters

TypeNameDescription
BorderspositionBorder position.
ColorcolorThe border color.
LineStylelineStyleBorder 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);