API Reference
IVisualElement`1
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
public abstract T WithBackground(RGBColor color) #TSets the background color.
Parameters
- color System.String
- 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
- The background color.
Returns
The element instance for method chaining.
public abstract T WithBorder(BorderWidth width, String customValue = null) #TSets the border width using a predefined size.
Parameters
- width HtmlForgeX.Email.BorderWidth
- The border width size.
- customValue System.String = null
- Custom value when using BorderWidth.Custom.
Returns
The element instance for method chaining.
public abstract T WithBorder(Boolean enabled) #TEnables or disables borders for the element.
Parameters
- enabled System.Boolean
- If false, removes the border.
Returns
The element instance for method chaining.
public abstract T WithBorderColor(RGBColor color) #TSets the border color.
Parameters
- color System.String
- 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
- The border color.
Returns
The element instance for method chaining.
public abstract T WithBorderRadius(String radius) #TSets the border radius.
Parameters
- radius System.String
- The border radius value.
Returns
The element instance for method chaining.
public abstract T WithRounded(Radius radius, String customValue = null) #TSets the border radius using a predefined size.
Parameters
- radius HtmlForgeX.Email.Radius
- The border radius size.
- customValue System.String = null
- Custom value when using Custom.
Returns
The element instance for method chaining.
public abstract T WithRounded() #TApplies 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.