HtmlForgeX

API Reference

Class

EmailList

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements
ILayoutAware ISpaceable<EmailList>

Represents a list element for email layouts with email-safe styling. Provides ordered and unordered lists with customizable items.

Inheritance

Constructors

EmailList 2 overloads
public EmailList() #

Initializes a new instance of the EmailList class.

public EmailList(Boolean isOrdered) #

Initializes a new instance of the EmailList class.

Parameters

isOrdered System.Boolean requiredposition: 0
Whether this is an ordered list.

Methods

AddItem 2 overloads
public EmailList AddItem(Action<EmailListItem> config) #
Returns: EmailList

Adds a list item.

Parameters

text System.String requiredposition: 0
The item text.

Returns

The EmailListItem object for further configuration.

AddItem(System.Action{HtmlForgeX.Email.EmailListItem} config) #

Adds a list item with configuration.

Parameters

config System.Action{HtmlForgeX.Email.EmailListItem} required
Configuration action for the item.

Returns

The EmailList object, allowing for method chaining.

public EmailList Item(String text) #
Returns: EmailList

Adds a list item and returns the list for chaining.

Parameters

text System.String requiredposition: 0
The item text.

Returns

The EmailList object, allowing for method chaining.

public EmailList SetOrdered(Boolean isOrdered = true) #
Returns: EmailList

Sets whether this is an ordered list.

Parameters

isOrdered System.Boolean = true optionalposition: 0
True for ordered list, false for unordered.

Returns

The EmailList object, allowing for method chaining.

public override String ToString() #
Returns: String

Converts the EmailList to its HTML representation.

Returns

HTML string representing the email list.

public EmailList WithArrows() #
Returns: EmailList

Sets the list to use arrows.

Returns

The EmailList object, allowing for method chaining.

public EmailList WithBullets() #
Returns: EmailList

Sets the list to use bullets.

Returns

The EmailList object, allowing for method chaining.

public EmailList WithCheckmarks() #
Returns: EmailList

Sets the list to use checkmarks.

Returns

The EmailList object, allowing for method chaining.

public EmailList WithCircles() #
Returns: EmailList

Sets the list to use circles.

Returns

The EmailList object, allowing for method chaining.

WithColor 2 overloads
public EmailList WithColor(RGBColor color) #
Returns: EmailList

Sets the text color.

Parameters

color System.String requiredposition: 0
The text color.

Returns

The EmailList object, allowing for method chaining.

WithColor(HtmlForgeX.Email.RGBColor color) #

Sets the text color using RGBColor.

Parameters

color HtmlForgeX.Email.RGBColor required
The text color.

Returns

The EmailList object, allowing for method chaining.

public EmailList WithFontFamily(String fontFamily) #
Returns: EmailList

Sets the font family.

Parameters

fontFamily System.String requiredposition: 0
The font family.

Returns

The EmailList object, allowing for method chaining.

public EmailList WithFontSize(String fontSize) #
Returns: EmailList

Sets the font size.

Parameters

fontSize System.String requiredposition: 0
The font size.

Returns

The EmailList object, allowing for method chaining.

public EmailList WithNumbers() #
Returns: EmailList

Sets the list to use numbers.

Returns

The EmailList object, allowing for method chaining.

public EmailList WithSquares() #
Returns: EmailList

Sets the list to use squares.

Returns

The EmailList object, allowing for method chaining.

public EmailList WithStyle(EmailListStyle style) #
Returns: EmailList

Sets the list style.

Parameters

style HtmlForgeX.Email.EmailListStyle requiredposition: 0
The list style.

Returns

The EmailList object, allowing for method chaining.

Properties

public EmailListStyle ListStyle { get; set; } #

Gets or sets the list style.

public Boolean IsOrdered { get; set; } #

Gets or sets whether this is an ordered list (true) or unordered list (false).

public String FontFamily { get; set; } #

Gets or sets the font family for the list.

public String FontSize { get; set; } #

Gets or sets the font size for the list.

public String LineHeight { get; set; } #

Gets or sets the line height for the list.

public String Color { get; set; } #

Gets or sets the text color for the list.

public List<EmailListItem> Items { get; } #

Gets the list items.

Extension Methods

public static EmailList WithMargin(EmailList list, EmailSpacing vertical, EmailSpacing horizontal) #
Returns: EmailList

Sets vertical and horizontal margin on an EmailList using typed spacing values.

Parameters

list HtmlForgeX.Email.EmailList requiredposition: 0
Target list.
vertical HtmlForgeX.Email.EmailSpacing requiredposition: 1
Top and bottom margin.
horizontal HtmlForgeX.Email.EmailSpacing requiredposition: 2
Left and right margin.