HtmlForgeX

API Reference

Interface

IVisualElement`1

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email
Modifiers abstract

Interface for elements with visual styling capabilities. Provides properties and methods for backgrounds, borders, and visual effects.

Type Parameters

T
The concrete type implementing this interface.

Methods

WithBackground 2 overloads
public abstract T WithBackground(RGBColor color) #
Returns: T

Sets the background color.

Parameters

color System.String requiredposition: 0
The background color.

Returns

The element instance for method chaining.

WithBackground(HtmlForgeX.Email.RGBColor color) #

Sets the background color using RGBColor.

Parameters

color HtmlForgeX.Email.RGBColor required
The background color.

Returns

The element instance for method chaining.

WithBorder 2 overloads
public abstract T WithBorder(BorderWidth width, String customValue = null) #
Returns: T

Sets the border width using a predefined size.

Parameters

width HtmlForgeX.Email.BorderWidth requiredposition: 0
The border width size.
customValue System.String = null optionalposition: 1
Custom value when using BorderWidth.Custom.

Returns

The element instance for method chaining.

public abstract T WithBorder(Boolean enabled) #
Returns: T

Enables or disables borders for the element.

Parameters

enabled System.Boolean requiredposition: 0
If false, removes the border.

Returns

The element instance for method chaining.

WithBorderColor 2 overloads
public abstract T WithBorderColor(RGBColor color) #
Returns: T

Sets the border color.

Parameters

color System.String requiredposition: 0
The border color.

Returns

The element instance for method chaining.

WithBorderColor(HtmlForgeX.Email.RGBColor color) #

Sets the border color using RGBColor.

Parameters

color HtmlForgeX.Email.RGBColor required
The border color.

Returns

The element instance for method chaining.

public abstract T WithBorderRadius(String radius) #
Returns: T

Sets the border radius.

Parameters

radius System.String requiredposition: 0
The border radius value.

Returns

The element instance for method chaining.

WithRounded 2 overloads
public abstract T WithRounded(Radius radius, String customValue = null) #
Returns: T

Sets the border radius using a predefined size.

Parameters

radius HtmlForgeX.Email.Radius requiredposition: 0
The border radius size.
customValue System.String = null optionalposition: 1
Custom value when using Custom.

Returns

The element instance for method chaining.

public abstract T WithRounded() #
Returns: T

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

Returns

The element instance for method chaining.

Properties

public abstract String BackgroundColor { get; set; } #

Gets or sets the background color.

public abstract String BorderRadius { get; set; } #

Gets or sets the border radius.

public abstract String BorderColor { get; set; } #

Gets or sets the border color.

public abstract String BorderWidth { get; set; } #

Gets or sets the border width.