NanoXLSX.Core 3.0.0-rc.3
Loading...
Searching...
No Matches
NanoXLSX.Styles.BasicStyles Class Reference

Factory class with the most important predefined styles. More...

Static Public Member Functions

static Style ColorizedText (string rgb)
 Gets a style to colorize the text of a cell.
static Style ColorizedBackground (string rgb)
 Gets a style to colorize the background of a cell.
static Style Font (string fontName, float fontSize=11f, bool isBold=false, bool isItalic=false)
 Gets a style with a user defined font.

Properties

static Style Bold [get]
 Gets the bold style.
static Style BoldItalic [get]
 Gets the bold and italic style.
static Style BorderFrame [get]
 Gets the border frame style.
static Style BorderFrameHeader [get]
 Gets the border style for header cells.
static Style DateFormat [get]
 Gets the date format style.
static Style TimeFormat [get]
 Gets the time format style.
static Style DoubleUnderline [get]
 Gets the double underline style.
static Style DottedFill_0_125 [get]
 Gets the special pattern fill style (for compatibility).
static Style Italic [get]
 Gets the italic style.
static Style MergeCellStyle [get]
 Gets the style used when merging cells.
static Style RoundFormat [get]
 Gets the round format style.
static Style Strike [get]
 Gets the strike style.
static Style Underline [get]
 Gets the underline style.

Detailed Description

Factory class with the most important predefined styles.

Definition at line 20 of file BasicStyles.cs.

Member Function Documentation

◆ ColorizedBackground()

Style NanoXLSX.Styles.BasicStyles.ColorizedBackground ( string rgb)
static

Gets a style to colorize the background of a cell.

Parameters
rgbRGB code in hex format (6 characters, e.g. FF00AC). Alpha will be set to full opacity (FF)
Returns
Style with background color definition
Exceptions
StyleExceptionA StyleException is thrown if an invalid hex value is passed

Definition at line 264 of file BasicStyles.cs.

◆ ColorizedText()

Style NanoXLSX.Styles.BasicStyles.ColorizedText ( string rgb)
static

Gets a style to colorize the text of a cell.

Parameters
rgbRGB code in hex format (6 characters, e.g. FF00AC). Alpha will be set to full opacity (FF)
Returns
Style with font color definition
Exceptions
StyleExceptionA StyleException is thrown if an invalid hex value is passed

Definition at line 250 of file BasicStyles.cs.

◆ Font()

Style NanoXLSX.Styles.BasicStyles.Font ( string fontName,
float fontSize = 11f,
bool isBold = false,
bool isItalic = false )
static

Gets a style with a user defined font.

Parameters
fontNameName of the font
fontSizeSize of the font in points (optional; default 11)
isBoldIf true, the font will be bold (optional; default false)
isItalicIf true, the font will be italic (optional; default false)
Returns
Style with font definition
Remarks
The font name as well as the availability of bold and italic on the font cannot be validated by NanoXLSX. The generated file may be corrupt or rendered with a fall-back font in case of an error

Definition at line 283 of file BasicStyles.cs.

Property Documentation

◆ Bold

Style NanoXLSX.Styles.BasicStyles.Bold
staticget

Gets the bold style.

Definition at line 75 of file BasicStyles.cs.

◆ BoldItalic

Style NanoXLSX.Styles.BasicStyles.BoldItalic
staticget

Gets the bold and italic style.

Definition at line 78 of file BasicStyles.cs.

◆ BorderFrame

Style NanoXLSX.Styles.BasicStyles.BorderFrame
staticget

Gets the border frame style.

Definition at line 81 of file BasicStyles.cs.

◆ BorderFrameHeader

Style NanoXLSX.Styles.BasicStyles.BorderFrameHeader
staticget

Gets the border style for header cells.

Definition at line 84 of file BasicStyles.cs.

◆ DateFormat

Style NanoXLSX.Styles.BasicStyles.DateFormat
staticget

Gets the date format style.

Definition at line 87 of file BasicStyles.cs.

◆ DottedFill_0_125

Style NanoXLSX.Styles.BasicStyles.DottedFill_0_125
staticget

Gets the special pattern fill style (for compatibility).

Definition at line 97 of file BasicStyles.cs.

◆ DoubleUnderline

Style NanoXLSX.Styles.BasicStyles.DoubleUnderline
staticget

Gets the double underline style.

Definition at line 93 of file BasicStyles.cs.

◆ Italic

Style NanoXLSX.Styles.BasicStyles.Italic
staticget

Gets the italic style.

Definition at line 101 of file BasicStyles.cs.

◆ MergeCellStyle

Style NanoXLSX.Styles.BasicStyles.MergeCellStyle
staticget

Gets the style used when merging cells.

Definition at line 104 of file BasicStyles.cs.

◆ RoundFormat

Style NanoXLSX.Styles.BasicStyles.RoundFormat
staticget

Gets the round format style.

Definition at line 107 of file BasicStyles.cs.

◆ Strike

Style NanoXLSX.Styles.BasicStyles.Strike
staticget

Gets the strike style.

Definition at line 110 of file BasicStyles.cs.

◆ TimeFormat

Style NanoXLSX.Styles.BasicStyles.TimeFormat
staticget

Gets the time format style.

Definition at line 90 of file BasicStyles.cs.

◆ Underline

Style NanoXLSX.Styles.BasicStyles.Underline
staticget

Gets the underline style.

Definition at line 113 of file BasicStyles.cs.


The documentation for this class was generated from the following file: