NanoXLSX.Formatting 3.1.0
Loading...
Searching...
No Matches
NanoXLSX.Extensions.InlineStyleBuilder Class Reference

Builder for creating inline Styles.Font styles with a fluent API. More...

Public Member Functions

InlineStyleBuilder FontName (string fontName)
 Sets the font name for the inline style.
InlineStyleBuilder Size (float size)
 Sets the font size for the inline style.
InlineStyleBuilder Bold (bool bold=true)
 Sets whether the font is bold.
InlineStyleBuilder Italic (bool italic=true)
 Sets whether the font is italic.
InlineStyleBuilder Strikethrough (bool strikethrough=true)
 Sets whether the font has strikethrough.
InlineStyleBuilder Underline (Font.UnderlineValue style=Styles.Font.UnderlineValue.Single)
 Sets the underline style for the font.
InlineStyleBuilder Color (Color color)
 Sets the font color.
InlineStyleBuilder ColorArgb (string argb)
 Sets the font color from an RGB or ARGB hex string.
InlineStyleBuilder ColorTheme (Theme.ColorSchemeElement theme, double tint=0.0)
 Sets the font color from a theme color.
InlineStyleBuilder ColorIndexed (IndexedColor.Value indexed)
 Sets the font color from an indexed color value.
InlineStyleBuilder ColorIndexed (int colorIndex)
 Sets the font color from an indexed color value, using the index number (0-65).
InlineStyleBuilder VerticalAlign (Font.VerticalTextAlignValue alignment)
 Sets the vertical alignment for the font.
InlineStyleBuilder Superscript ()
 Sets the font to superscript.
InlineStyleBuilder Subscript ()
 Sets the font to subscript.
InlineStyleBuilder Outline (bool outline=true)
 Sets whether the font has outline.
InlineStyleBuilder Shadow (bool shadow=true)
 Sets whether the font has shadow.
InlineStyleBuilder Condense (bool condense=true)
 Sets whether the font is condensed.
InlineStyleBuilder Extend (bool extend=true)
 Sets whether the font is extended.
InlineStyleBuilder Charset (Font.CharsetValue charset)
 Sets the font charset.
InlineStyleBuilder Family (Font.FontFamilyValue family)
 Sets the font family.
InlineStyleBuilder Scheme (Font.SchemeValue scheme)
 Sets the font scheme.
Font Build (bool reset=true)
 Builds the inline style instance.

Detailed Description

Builder for creating inline Styles.Font styles with a fluent API.

Definition at line 18 of file InlineStyleBuilder.cs.

Member Function Documentation

◆ Bold()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Bold ( bool bold = true)

Sets whether the font is bold.

Parameters
boldBold if true (default)
Returns
The current builder instance

Definition at line 49 of file InlineStyleBuilder.cs.

◆ Build()

Font NanoXLSX.Extensions.InlineStyleBuilder.Build ( bool reset = true)

Builds the inline style instance.

Parameters
resetIf true, resets the builder after building (default = true)
Returns
The built inline style

Definition at line 258 of file InlineStyleBuilder.cs.

◆ Charset()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Charset ( Font.CharsetValue charset)

Sets the font charset.

Parameters
charsetFont charset value
Returns
The current builder instance

Definition at line 225 of file InlineStyleBuilder.cs.

◆ Color()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Color ( Color color)

Sets the font color.

Parameters
colorFont color
Returns
The current builder instance

Definition at line 93 of file InlineStyleBuilder.cs.

◆ ColorArgb()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.ColorArgb ( string argb)

Sets the font color from an RGB or ARGB hex string.

Parameters
argbRGB value (6 characters) or ARGB (8 characters) with optional, leading #
Returns
The current builder instance
Remarks
In case of a 6 character RGB value, 'FF' will be automatically prepended to this value

Definition at line 105 of file InlineStyleBuilder.cs.

◆ ColorIndexed() [1/2]

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.ColorIndexed ( IndexedColor.Value indexed)

Sets the font color from an indexed color value.

Parameters
indexedIndexed color value
Returns
The current builder instance

Definition at line 128 of file InlineStyleBuilder.cs.

◆ ColorIndexed() [2/2]

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.ColorIndexed ( int colorIndex)

Sets the font color from an indexed color value, using the index number (0-65).

Parameters
colorIndexIndexed color value
Returns
The current builder instance

Definition at line 139 of file InlineStyleBuilder.cs.

◆ ColorTheme()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.ColorTheme ( Theme.ColorSchemeElement theme,
double tint = 0::0 )

Sets the font color from a theme color.

Parameters
themeColor scheme element
tintOptional tint value (-1.0 to 1.0, default = 0.0)
Returns
The current builder instance

Definition at line 117 of file InlineStyleBuilder.cs.

◆ Condense()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Condense ( bool condense = true)

Sets whether the font is condensed.

Parameters
condenseIs condensed if true (default)
Returns
The current builder instance

Definition at line 203 of file InlineStyleBuilder.cs.

◆ Extend()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Extend ( bool extend = true)

Sets whether the font is extended.

Parameters
extendIs extended if true (default)
Returns
The current builder instance

Definition at line 214 of file InlineStyleBuilder.cs.

◆ Family()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Family ( Font.FontFamilyValue family)

Sets the font family.

Parameters
familyFont family value
Returns
The current builder instance

Definition at line 236 of file InlineStyleBuilder.cs.

◆ FontName()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.FontName ( string fontName)

Sets the font name for the inline style.

Parameters
fontNameFont name
Returns
The current builder instance

Definition at line 27 of file InlineStyleBuilder.cs.

◆ Italic()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Italic ( bool italic = true)

Sets whether the font is italic.

Parameters
italicItalic if true (default)
Returns
The current builder instance

Definition at line 60 of file InlineStyleBuilder.cs.

◆ Outline()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Outline ( bool outline = true)

Sets whether the font has outline.

Parameters
outlineHas an outline if true (default)
Returns
The current builder instance

Definition at line 181 of file InlineStyleBuilder.cs.

◆ Scheme()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Scheme ( Font.SchemeValue scheme)

Sets the font scheme.

Parameters
schemeFont scheme value
Returns
The current builder instance

Definition at line 247 of file InlineStyleBuilder.cs.

◆ Shadow()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Shadow ( bool shadow = true)

Sets whether the font has shadow.

Parameters
shadowHas a shadow if true (default)
Returns
The current builder instance

Definition at line 192 of file InlineStyleBuilder.cs.

◆ Size()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Size ( float size)

Sets the font size for the inline style.

Parameters
sizeFont size in points
Returns
The current builder instance

Definition at line 38 of file InlineStyleBuilder.cs.

◆ Strikethrough()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Strikethrough ( bool strikethrough = true)

Sets whether the font has strikethrough.

Parameters
strikethroughHas strikethrough if true (default)
Returns
The current builder instance

Definition at line 71 of file InlineStyleBuilder.cs.

◆ Subscript()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Subscript ( )

Sets the font to subscript.

Returns
The current builder instance

Definition at line 170 of file InlineStyleBuilder.cs.

◆ Superscript()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Superscript ( )

Sets the font to superscript.

Returns
The current builder instance

Definition at line 160 of file InlineStyleBuilder.cs.

◆ Underline()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.Underline ( Font.UnderlineValue style = Styles::Font::UnderlineValue::Single)

Sets the underline style for the font.

Parameters
styleUnderline style
Returns
The current builder instance

Definition at line 82 of file InlineStyleBuilder.cs.

◆ VerticalAlign()

InlineStyleBuilder NanoXLSX.Extensions.InlineStyleBuilder.VerticalAlign ( Font.VerticalTextAlignValue alignment)

Sets the vertical alignment for the font.

Parameters
alignmentAlignment value
Returns
The current builder instance

Definition at line 150 of file InlineStyleBuilder.cs.


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