HtmlForgeX

API Reference

Class

EmailDivider

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Base Element
Implements
ILayoutAware IVisualElement<EmailDivider> IRoundable<EmailDivider> IRoundable

Represents a visual divider element for email layouts with enhanced styling options. Provides section dividers with customizable patterns, colors, and decorative elements. Better alternative to EmailHorizontalRule with more visual options.

Inheritance

Constructors

public EmailDivider() #

Initializes a new instance of the EmailDivider class.

Methods

public EmailDivider Dashed() #
Returns: EmailDivider

Applies a dashed line pattern to the divider.

public EmailDivider Dotted() #
Returns: EmailDivider

Applies a dotted line pattern to the divider.

public EmailDivider Double() #
Returns: EmailDivider

Applies a double line pattern to the divider.

public override Void EvaluateLayout(LayoutContext context) #
Returns: Void

Applies default border radius for the divider.

Parameters

context HtmlForgeX.Email.LayoutContext requiredposition: 0
Layout evaluation context.
public EmailDivider Gradient() #
Returns: EmailDivider

Applies a gradient fade pattern to the divider.

public EmailDivider Medium() #
Returns: EmailDivider

Sets the divider height to a medium line (2 px).

RenderDividerWithIcon(System.Text.StringBuilder arg1, System.String arg2, System.String arg3) #

Renders a divider with centered icon.

Parameters

arg1 System.Text.StringBuilder required
arg2 System.String required
arg3 System.String required
RenderSimpleDivider(System.Text.StringBuilder arg1, System.String arg2, System.String arg3) #

Renders a simple divider line.

Parameters

arg1 System.Text.StringBuilder required
arg2 System.String required
arg3 System.String required
public EmailDivider Thick() #
Returns: EmailDivider

Sets the divider height to a thick line (4 px).

public EmailDivider Thin() #
Returns: EmailDivider

Sets the divider height to a thin line (1 px).

public override String ToString() #
Returns: String

Renders the divider as HTML. Uses table-based layout for better email client compatibility.

WithBackground 2 overloads
public virtual EmailDivider WithBackground(RGBColor color) #
Returns: EmailDivider

Sets the background color.

Parameters

color System.String requiredposition: 0
WithBackground(HtmlForgeX.Email.RGBColor color) #

Sets the background color using RGBColor.

Parameters

color HtmlForgeX.Email.RGBColor required
WithBorder 2 overloads
public virtual EmailDivider WithBorder(BorderWidth width, String customValue = null) #
Returns: EmailDivider

Sets the border width using a predefined size.

Parameters

width HtmlForgeX.Email.BorderWidth requiredposition: 0
customValue System.String = null optionalposition: 1
public virtual EmailDivider WithBorder(Boolean enabled) #
Returns: EmailDivider

Enables or disables the divider border.

Parameters

enabled System.Boolean requiredposition: 0
WithBorderColor 2 overloads
public virtual EmailDivider WithBorderColor(RGBColor color) #
Returns: EmailDivider

Sets the border color.

Parameters

color System.String requiredposition: 0
WithBorderColor(HtmlForgeX.Email.RGBColor color) #

Sets the border color using RGBColor.

Parameters

color HtmlForgeX.Email.RGBColor required
public virtual EmailDivider WithBorderRadius(String radius) #
Returns: EmailDivider

Sets the border radius.

Parameters

radius System.String requiredposition: 0
WithColor 2 overloads
public EmailDivider WithColor(RGBColor color) #
Returns: EmailDivider

Sets the color of the divider (same as background).

Parameters

color System.String requiredposition: 0
WithColor(HtmlForgeX.Email.RGBColor color) #

Sets the color of the divider using RGBColor.

Parameters

color HtmlForgeX.Email.RGBColor required
public EmailDivider WithHeight(String height) #
Returns: EmailDivider

Sets the height of the divider.

Parameters

height System.String requiredposition: 0
public EmailDivider WithIcon(String icon) #
Returns: EmailDivider

Adds a decorative icon or text to the center of the divider.

Parameters

icon System.String requiredposition: 0
WithIconColor 2 overloads
public EmailDivider WithIconColor(RGBColor color) #
Returns: EmailDivider

Sets the icon color.

Parameters

color System.String requiredposition: 0
WithIconColor(HtmlForgeX.Email.RGBColor color) #

Sets the icon color using RGBColor.

Parameters

color HtmlForgeX.Email.RGBColor required
public EmailDivider WithPattern(EmailDividerPattern pattern) #
Returns: EmailDivider

Sets the pattern style of the divider.

Parameters

pattern HtmlForgeX.Email.EmailDividerPattern requiredposition: 0
WithRounded 2 overloads
public virtual EmailDivider WithRounded(Radius radius, String customValue = null) #
Returns: EmailDivider

Sets the border radius using a predefined size.

Parameters

radius HtmlForgeX.Email.Radius requiredposition: 0
customValue System.String = null optionalposition: 1
public virtual EmailDivider WithRounded() #
Returns: EmailDivider

Applies the default border radius (6px) for rounded corners.

public virtual EmailDivider WithRoundingMode(RoundingMode mode) #
Returns: EmailDivider

Sets the rounding mode for this divider.

Parameters

mode HtmlForgeX.Email.RoundingMode requiredposition: 0
Rounding mode.

Returns

The divider instance.

public EmailDivider WithWidth(String width) #
Returns: EmailDivider

Sets the width of the divider.

Parameters

width System.String requiredposition: 0

Properties

public virtual String BackgroundColor { get; set; } #

Gets or sets the background color of the divider.

public virtual String BorderRadius { get; set; } #

Gets or sets the border radius.

public virtual RoundingMode RoundingMode { get; set; } #

Controls how rounding is applied when no explicit radius is set.

public virtual String BorderColor { get; set; } #

Gets or sets the border color.

public virtual String BorderWidth { get; set; } #

Gets or sets the border width.

public String Height { get; set; } #

Gets or sets the height of the divider.

public String Width { get; set; } #

Gets or sets the width of the divider.

public EmailDividerPattern Pattern { get; set; } #

Gets or sets the pattern style of the divider.

public String Icon { get; set; } #

Gets or sets optional decorative text or icon.

public String IconColor { get; set; } #

Gets or sets the icon color.