API Reference
EmailTableCell
Represents a table cell in an email table.
Inheritance
- Object
- EmailTableCell
Constructors
public EmailTableCell() #Methods
public EmailTableCell EnableTopBorder() #EmailTableCellEnables the top border for this cell.
Returns
The EmailTableCell object, allowing for method chaining.
GetContentHtml(HtmlForgeX.Email.Email arg1) #Gets the HTML content for the cell.
Parameters
- arg1 HtmlForgeX.Email.Email
Returns
HTML string representing the cell content.
public EmailTableCell SetAlign(String align) #EmailTableCellSets the cell alignment.
Parameters
- align System.String
- The alignment (left, center, right).
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell SetHtml(String html) #EmailTableCellEditorBrowsable(1)Sets the cell HTML content.
Parameters
- html System.String
- The HTML content.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell SetImage(String src, Int32 width = 64, Int32 height = 64, String alt = "", String link = "") #EmailTableCellSets the cell as an image.
Parameters
- src System.String
- The image source URL.
- width System.Int32 = 64
- The image width.
- height System.Int32 = 64
- The image height.
- alt System.String = ""
- The image alt text.
- link System.String = ""
- Optional link URL for the image.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithAlignment(Alignment alignment) #EmailTableCellSets the alignment for the cell.
Parameters
- alignment HtmlForgeX.Email.Alignment
- The alignment value.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithBackgroundColor(String color) #EmailTableCellSets the background color for the cell.
Parameters
- color System.String
- The background color value.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithBadge(String text, String backgroundColor = "#64748B", String color = "#FFFFFF") #EmailTableCellConvenience helper for rendering a compact status badge in a table cell.
Parameters
- text System.String
- backgroundColor System.String = "#64748B"
- color System.String = "#FFFFFF"
public EmailTableCell WithBadge(Action<EmailBadge> configure) #EmailTableCellConfigures and renders a badge in a table cell.
Parameters
- configure System.Action{HtmlForgeX.Email.EmailBadge}
public EmailTableCell WithBool(Boolean value, String trueText = "Yes", String falseText = "No", EmailStatusTone trueTone = Success, EmailStatusTone falseTone = Danger) #EmailTableCellRenders a boolean value as a compact status (dot + label) without raw HTML. Aligns to center by default.
Parameters
- value System.Boolean
- trueText System.String = "Yes"
- falseText System.String = "No"
- trueTone HtmlForgeX.Email.EmailStatusTone = Success
- falseTone HtmlForgeX.Email.EmailStatusTone = Danger
public EmailTableCell WithBool(Nullable<Boolean> value, String trueText = "Yes", String falseText = "No", String nullText = "—", EmailStatusTone trueTone = Success, EmailStatusTone falseTone = Danger, EmailStatusTone nullTone = Neutral) #EmailTableCellRenders a boolean value as a compact status (dot + label) without raw HTML. When the value is null, renders nullText with neutral tone. Aligns to center by default.
Parameters
- value System.Nullable{System.Boolean}
- trueText System.String = "Yes"
- falseText System.String = "No"
- nullText System.String = "—"
- trueTone HtmlForgeX.Email.EmailStatusTone = Success
- falseTone HtmlForgeX.Email.EmailStatusTone = Danger
- nullTone HtmlForgeX.Email.EmailStatusTone = Neutral
public EmailTableCell WithBytes(Nullable<Int64> bytes, Int32 decimals = 2, EmailBytesUnitSystem unitSystem = Binary, CultureInfo culture = null) #EmailTableCellSets the cell text to a formatted byte size (e.g., "2.47 MB") and aligns it to the right by default.
Parameters
- bytes System.Int64
- decimals System.Int32 = 2
- unitSystem HtmlForgeX.Email.EmailBytesUnitSystem = Binary
- culture System.Globalization.CultureInfo = null
WithBytes(System.Nullable{System.Int64} bytes, System.Int32 decimals, HtmlForgeX.Email.EmailBytesUnitSystem unitSystem, System.Globalization.CultureInfo culture) #Sets the cell text to a formatted byte size (nullable) and aligns it to the right by default. When the value is null, renders an empty cell.
Parameters
- bytes System.Nullable{System.Int64}
- decimals System.Int32
- unitSystem HtmlForgeX.Email.EmailBytesUnitSystem
- culture System.Globalization.CultureInfo
public EmailTableCell WithColor(String color) #EmailTableCellSets the text color for the cell.
Parameters
- color System.String
- The color value.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithCompactNumber(Nullable<Int64> value, Int32 decimals = 1, EmailCompactNumberCase suffixCase = Lower, CultureInfo culture = null) #EmailTableCellSets the cell text to a compact number representation (e.g., "1.2k") and aligns it to the right by default.
Parameters
- value System.Int64
- decimals System.Int32 = 1
- suffixCase HtmlForgeX.Email.EmailCompactNumberCase = Lower
- culture System.Globalization.CultureInfo = null
WithCompactNumber(System.Nullable{System.Int64} value, System.Int32 decimals, HtmlForgeX.Email.EmailCompactNumberCase suffixCase, System.Globalization.CultureInfo culture) #Sets the cell text to a compact number representation (nullable) and aligns it to the right by default. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{System.Int64}
- decimals System.Int32
- suffixCase HtmlForgeX.Email.EmailCompactNumberCase
- culture System.Globalization.CultureInfo
public EmailTableCell WithCurrency(Nullable<Decimal> amount, String currencySymbol = "$", Int32 decimals = 2, CultureInfo culture = null) #EmailTableCellAlias for CultureInfo) to match other APIs that use "currency" naming.
Parameters
- amount System.Decimal
- currencySymbol System.String = "$"
- decimals System.Int32 = 2
- culture System.Globalization.CultureInfo = null
WithCurrency(System.Nullable{System.Decimal} amount, System.String currencySymbol, System.Int32 decimals, System.Globalization.CultureInfo culture) #Alias for CultureInfo) to match other APIs that use "currency" naming.
Parameters
- amount System.Nullable{System.Decimal}
- currencySymbol System.String
- decimals System.Int32
- culture System.Globalization.CultureInfo
public EmailTableCell WithDate(Nullable<DateTimeOffset> value, String format = "MMM d, yyyy", CultureInfo culture = null) #EmailTableCellFormats a date using an email-friendly default and sets it as the cell text.
Parameters
- value System.DateTime
- format System.String = "MMM d, yyyy"
- culture System.Globalization.CultureInfo = null
WithDate(System.DateTimeOffset value, System.String format, System.Globalization.CultureInfo culture) #Formats a date using an email-friendly default and sets it as the cell text.
Parameters
- value System.DateTimeOffset
- format System.String
- culture System.Globalization.CultureInfo
WithDate(System.Nullable{System.DateTime} value, System.String format, System.Globalization.CultureInfo culture) #Formats a date using an email-friendly default (nullable) and sets it as the cell text. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{System.DateTime}
- format System.String
- culture System.Globalization.CultureInfo
WithDate(System.Nullable{System.DateTimeOffset} value, System.String format, System.Globalization.CultureInfo culture) #Formats a date using an email-friendly default (nullable) and sets it as the cell text. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{System.DateTimeOffset}
- format System.String
- culture System.Globalization.CultureInfo
public EmailTableCell WithDateTime(Nullable<DateTimeOffset> value, String format = "MMM d, yyyy · h:mm tt", CultureInfo culture = null) #EmailTableCellFormats a date+time using an email-friendly default and sets it as the cell text.
Parameters
- value System.DateTime
- format System.String = "MMM d, yyyy · h:mm tt"
- culture System.Globalization.CultureInfo = null
WithDateTime(System.DateTimeOffset value, System.String format, System.Globalization.CultureInfo culture) #Formats a date+time using an email-friendly default and sets it as the cell text.
Parameters
- value System.DateTimeOffset
- format System.String
- culture System.Globalization.CultureInfo
WithDateTime(System.Nullable{System.DateTime} value, System.String format, System.Globalization.CultureInfo culture) #Formats a date+time using an email-friendly default (nullable) and sets it as the cell text. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{System.DateTime}
- format System.String
- culture System.Globalization.CultureInfo
WithDateTime(System.Nullable{System.DateTimeOffset} value, System.String format, System.Globalization.CultureInfo culture) #Formats a date+time using an email-friendly default (nullable) and sets it as the cell text. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{System.DateTimeOffset}
- format System.String
- culture System.Globalization.CultureInfo
public EmailTableCell WithDuration(Nullable<TimeSpan> duration, Int32 maxParts = 2) #EmailTableCellFormats a duration into a compact representation (e.g., "1h 30m") and aligns it to the right by default.
Parameters
- duration System.TimeSpan
- maxParts System.Int32 = 2
WithDuration(System.Nullable{System.TimeSpan} duration, System.Int32 maxParts) #Formats a duration into a compact representation (nullable) and aligns it to the right by default. When the value is null, renders an empty cell.
Parameters
- duration System.Nullable{System.TimeSpan}
- maxParts System.Int32
public EmailTableCell WithElement(Element element) #EmailTableCellSets the cell content to an HtmlForgeX element (badge, link, text, etc.) without raw HTML.
Parameters
- element HtmlForgeX.Email.Element
public EmailTableCell WithEmailAddress(String email, String text = null, EmailFontSize size = Regular) #EmailTableCellRenders an email address as a mailto link (no raw HTML required).
Parameters
- email System.String
- text System.String = null
- size HtmlForgeX.Email.EmailFontSize = Regular
public EmailTableCell WithEnum<TEnum>(Nullable<TEnum> value, Boolean humanize = true) #EmailTableCellType Parameters
- TEnum
Parameters
- value TEnum
- humanize Boolean = true
WithEnum``1(``0 value, System.Boolean humanize) #Renders an enum value (optionally humanized) without requiring manual string formatting.
Parameters
- value ``0
- humanize System.Boolean
WithEnum``1(System.Nullable{``0} value, System.Boolean humanize) #Renders an enum value (nullable) without requiring manual string formatting. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{``0}
- humanize System.Boolean
public EmailTableCell WithFontSize(String size) #EmailTableCellSets the font size for the cell.
Parameters
- size System.String
- The font size value.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithFontStyle(FontStyle style) #EmailTableCellSets the font style for the cell.
Parameters
- style HtmlForgeX.Email.FontStyle
- The font style.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithFontWeight(FontWeight weight) #EmailTableCellSets the font weight for the cell.
Parameters
- weight HtmlForgeX.Email.FontWeight
- The font weight.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithHash(String hash, EmailFontSize size = Small, Boolean breakAll = true) #EmailTableCellRenders a hash/checksum value in monospace (useful for SHA256/MD5 checksums).
Parameters
- hash System.String
- size HtmlForgeX.Email.EmailFontSize = Small
- breakAll System.Boolean = true
public EmailTableCell WithHashCompact(String hash, Int32 head = 12, Int32 tail = 8, EmailFontSize size = Small, String ellipsis = "…") #EmailTableCellRenders a hash/checksum in monospace and truncates the middle for readability.
Parameters
- hash System.String
- head System.Int32 = 12
- tail System.Int32 = 8
- size HtmlForgeX.Email.EmailFontSize = Small
- ellipsis System.String = "…"
public EmailTableCell WithId(String id, EmailFontSize size = Small, Boolean breakAll = true) #EmailTableCellRenders an ID-like value in monospace (useful for order IDs, transfer IDs, request IDs).
Parameters
- id System.String
- size HtmlForgeX.Email.EmailFontSize = Small
- breakAll System.Boolean = true
public EmailTableCell WithIdCompact(String id, Int32 head = 10, Int32 tail = 6, EmailFontSize size = Small, String ellipsis = "…") #EmailTableCellRenders an ID-like value in monospace and truncates the middle for readability (e.g., "abc…xyz").
Parameters
- id System.String
- head System.Int32 = 10
- tail System.Int32 = 6
- size HtmlForgeX.Email.EmailFontSize = Small
- ellipsis System.String = "…"
public EmailTableCell WithInlineStack(Action<EmailInlineStack> configure) #EmailTableCellConfigures and renders an inline stack (horizontal row) in a table cell (no raw HTML required).
Parameters
- configure System.Action{HtmlForgeX.Email.EmailInlineStack}
public EmailTableCell WithInlineText(Action<InlineTextBuilder> build) #EmailTableCellSets the cell content using an email-safe inline text builder (no raw HTML required).
Parameters
- build System.Action{HtmlForgeX.Email.EmailTableCell.InlineTextBuilder}
- Builder callback.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithIpAddress(String ipAddress, EmailFontSize size = Small) #EmailTableCellRenders an IP address in monospace (typically no aggressive wrapping).
Parameters
- ipAddress System.String
- size HtmlForgeX.Email.EmailFontSize = Small
public EmailTableCell WithLink(String text, String href, EmailFontSize size = Regular, EmailTextWrapMode wrapMode = Default) #EmailTableCellRenders a safe link inside a table cell (no raw HTML required).
Parameters
- text System.String
- href System.String
- size HtmlForgeX.Email.EmailFontSize = Regular
- wrapMode HtmlForgeX.Email.EmailTextWrapMode = Default
public EmailTableCell WithMediaObject(Action<EmailMediaObject> configure) #EmailTableCellConfigures and renders a media object (leading + content + trailing) in a table cell. Useful for "icon + title + subtitle" patterns without raw HTML.
Parameters
- configure System.Action{HtmlForgeX.Email.EmailMediaObject}
public EmailTableCell WithMoney(Nullable<Decimal> amount, String currencySymbol = "$", Int32 decimals = 2, CultureInfo culture = null) #EmailTableCellSets the cell text to a formatted money/currency value and aligns it to the right by default.
Parameters
- amount System.Decimal
- currencySymbol System.String = "$"
- decimals System.Int32 = 2
- culture System.Globalization.CultureInfo = null
WithMoney(System.Nullable{System.Decimal} amount, System.String currencySymbol, System.Int32 decimals, System.Globalization.CultureInfo culture) #Sets the cell text to a formatted money/currency value (nullable) and aligns it to the right by default. When the value is null, renders an empty cell.
Parameters
- amount System.Nullable{System.Decimal}
- currencySymbol System.String
- decimals System.Int32
- culture System.Globalization.CultureInfo
public EmailTableCell WithMonospace(String text, EmailFontSize size = Small, Boolean breakAll = true) #EmailTableCellRenders monospace content inside the cell without requiring raw HTML. Useful for technical values such as DNS records, IDs, hashes, and tokens.
Parameters
- text System.String
- size HtmlForgeX.Email.EmailFontSize = Small
- breakAll System.Boolean = true
public EmailTableCell WithNumber(Nullable<Decimal> value, Int32 decimals = 0, CultureInfo culture = null) #EmailTableCellSets the cell text to a formatted number (grouped) and aligns it to the right by default.
Parameters
- value System.Decimal
- decimals System.Int32 = 0
- culture System.Globalization.CultureInfo = null
WithNumber(System.Nullable{System.Decimal} value, System.Int32 decimals, System.Globalization.CultureInfo culture) #Sets the cell text to a formatted number (grouped) and aligns it to the right by default. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{System.Decimal}
- decimals System.Int32
- culture System.Globalization.CultureInfo
public EmailTableCell WithPercent(Nullable<Decimal> percent, Int32 decimals = 0, CultureInfo culture = null) #EmailTableCellSets the cell text to a formatted percent value (expects percent units, e.g. 12.3 => "12.3%") and aligns it to the right by default.
Parameters
- percent System.Decimal
- decimals System.Int32 = 0
- culture System.Globalization.CultureInfo = null
WithPercent(System.Nullable{System.Decimal} percent, System.Int32 decimals, System.Globalization.CultureInfo culture) #Sets the cell text to a formatted percent value (nullable) and aligns it to the right by default. When the value is null, renders an empty cell.
Parameters
- percent System.Nullable{System.Decimal}
- decimals System.Int32
- culture System.Globalization.CultureInfo
public EmailTableCell WithPhoneNumber(String phoneNumber, String text = null, EmailFontSize size = Regular) #EmailTableCellRenders a phone number as a tel link (no raw HTML required).
Parameters
- phoneNumber System.String
- text System.String = null
- size HtmlForgeX.Email.EmailFontSize = Regular
public EmailTableCell WithQty(Int32 quantity, CultureInfo culture = null) #EmailTableCellFormats a quantity value and aligns it to the center by default.
Parameters
- quantity System.Int32
- culture System.Globalization.CultureInfo = null
public EmailTableCell WithRelativeTime(Nullable<DateTimeOffset> when, Nullable<DateTimeOffset> now = null) #EmailTableCellFormats a timestamp relative to now (e.g., "2h ago", "in 3d") and aligns it to the right by default.
Parameters
- when System.DateTimeOffset
- now System.Nullable{System.DateTimeOffset} = null
WithRelativeTime(System.Nullable{System.DateTimeOffset} when, System.Nullable{System.DateTimeOffset} now) #Formats a timestamp relative to now (nullable) and aligns it to the right by default. When the value is null, renders an empty cell.
Parameters
- when System.Nullable{System.DateTimeOffset}
- now System.Nullable{System.DateTimeOffset}
public EmailTableCell WithStatus(String label, EmailStatusTone tone = Neutral, String meta = "", String href = null) #EmailTableCellRenders a compact status indicator (dot + label) without raw HTML.
Parameters
- label System.String
- tone HtmlForgeX.Email.EmailStatusTone = Neutral
- meta System.String = ""
- href System.String = null
public EmailTableCell WithText(String text) #EmailTableCellSets the cell text content.
Parameters
- text System.String
- The text content.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithTextBlock(Action<EmailTextBlock> configure) #EmailTableCellConfigures and renders a rich text block in a table cell (no raw HTML required).
Parameters
- configure System.Action{HtmlForgeX.Email.EmailTextBlock}
public EmailTableCell WithTextDecoration(TextDecoration decoration) #EmailTableCellSets the text decoration for the cell.
Parameters
- decoration HtmlForgeX.Email.TextDecoration
- The text decoration.
Returns
The EmailTableCell object, allowing for method chaining.
public EmailTableCell WithTime(Nullable<DateTimeOffset> value, String format = "h:mm tt", CultureInfo culture = null) #EmailTableCellFormats a time using an email-friendly default and sets it as the cell text.
Parameters
- value System.DateTime
- format System.String = "h:mm tt"
- culture System.Globalization.CultureInfo = null
WithTime(System.DateTimeOffset value, System.String format, System.Globalization.CultureInfo culture) #Formats a time using an email-friendly default and sets it as the cell text.
Parameters
- value System.DateTimeOffset
- format System.String
- culture System.Globalization.CultureInfo
WithTime(System.Nullable{System.DateTime} value, System.String format, System.Globalization.CultureInfo culture) #Formats a time using an email-friendly default (nullable) and sets it as the cell text. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{System.DateTime}
- format System.String
- culture System.Globalization.CultureInfo
WithTime(System.Nullable{System.DateTimeOffset} value, System.String format, System.Globalization.CultureInfo culture) #Formats a time using an email-friendly default (nullable) and sets it as the cell text. When the value is null, renders an empty cell.
Parameters
- value System.Nullable{System.DateTimeOffset}
- format System.String
- culture System.Globalization.CultureInfo
public EmailTableCell WithTitleAndSubtitle(String title, String subtitle, EmailFontSize subtitleSize = Small) #EmailTableCellConvenience helper for a common table-cell pattern: bold title + muted subtitle on the next line.
Parameters
- title System.String
- subtitle System.String
- subtitleSize HtmlForgeX.Email.EmailFontSize = Small
public EmailTableCell WithUrl(String url, String text = null, EmailFontSize size = Regular, EmailTextWrapMode wrapMode = Default) #EmailTableCellRenders a URL link inside a table cell (no raw HTML required).
Parameters
- url System.String
- text System.String = null
- size HtmlForgeX.Email.EmailFontSize = Regular
- wrapMode HtmlForgeX.Email.EmailTextWrapMode = Default
public EmailTableCell WithWidth(String width) #EmailTableCellSets the cell width.
Parameters
- width System.String
- The width value.
Returns
The EmailTableCell object, allowing for method chaining.
Inherited Methods
Properties
public Boolean IncludeTopBorder { get; set; } #Whether to include a top border for this cell.
public Nullable<FontWeight> FontWeight { get; set; } #Font weight for the cell text.
public Nullable<TextDecoration> TextDecoration { get; set; } #Text decoration for the cell.
public String TextColor { get; set; } #Text color for the cell.
public String BackgroundColor { get; set; } #Background color for the cell.
public String FontSize { get; set; } #Font size for the cell text.
public Nullable<FontStyle> FontStyle { get; set; } #Font style for the cell text.
public Int32 ImageHeight { get; set; } #Image height in pixels.
public String ImageAlt { get; set; } #Alternative text for the image.
public String ImageLink { get; set; } #Optional hyperlink for the image.
InlineTextParts #Inline parts used by InlineTextBuilder>) (rendered with the current email theme).
ElementContent #Optional HtmlForgeX element rendered inside the cell (no raw HTML required).