HtmlForgeX

API Reference

Enum

Alignment

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Enum
Implements
IComparable ISpanFormattable IFormattable IConvertible
Modifiers sealed

Alignment options for text. The Justify value is not consistently supported by many email clients and may not render as expected.

Inheritance

  • Enum
  • Alignment

Values

public const Alignment Left #

Left aligned.

Value: 1
public const Alignment Center #

Centered.

Value: 2
public const Alignment Right #

Right aligned.

Value: 3
public const Alignment Justify #

Justified text.

Value: 4

Extension Methods

public static String ToCssValue(Alignment alignment) #
Returns: String

Converts an alignment value to its CSS representation.

Parameters

alignment HtmlForgeX.Email.Alignment requiredposition: 0
Alignment option.

Returns

CSS text-align value.

public static Void ValidateEmailAlignment(Alignment alignment) #
Returns: Void

Validates that the alignment is allowed for email components.

Parameters

alignment HtmlForgeX.Email.Alignment requiredposition: 0
Alignment to validate.