HtmlForgeX

API Reference

Class

EmailTableCondition

Namespace HtmlForgeX.Email
Assembly HtmlForgeX.Email

Represents a conditional formatting rule for table cells.

Inheritance

  • Object
  • EmailTableCondition

Constructors

public EmailTableCondition() #

Methods

Evaluate(System.Object cellValue) #

Evaluates the condition against a value.

Parameters

cellValue System.Object required
The cell value to test.

Returns

True if condition is met, false otherwise.

public EmailTableCondition WhenContains(String value) #
Returns: EmailTableCondition

Sets the comparison operator to contains (for strings).

Parameters

value System.String requiredposition: 0
The value to search for.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenEndsWith(String value) #
Returns: EmailTableCondition

Sets the comparison operator to ends with (for strings).

Parameters

value System.String requiredposition: 0
The value to search for.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenEquals(Object value) #
Returns: EmailTableCondition

Sets the comparison operator to equals.

Parameters

value System.Object requiredposition: 0
The value to compare against.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenGreaterThan(Object value) #
Returns: EmailTableCondition

Sets the comparison operator to greater than.

Parameters

value System.Object requiredposition: 0
The value to compare against.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenGreaterThanOrEqual(Object value) #
Returns: EmailTableCondition

Sets the comparison operator to greater than or equal.

Parameters

value System.Object requiredposition: 0
The value to compare against.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenLessThan(Object value) #
Returns: EmailTableCondition

Sets the comparison operator to less than.

Parameters

value System.Object requiredposition: 0
The value to compare against.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenLessThanOrEqual(Object value) #
Returns: EmailTableCondition

Sets the comparison operator to less than or equal.

Parameters

value System.Object requiredposition: 0
The value to compare against.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenLike(String pattern) #
Returns: EmailTableCondition

Sets the comparison operator to pattern match (like).

Parameters

pattern System.String requiredposition: 0
The pattern to match (supports * wildcard).

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenNotEquals(Object value) #
Returns: EmailTableCondition

Sets the comparison operator to not equals.

Parameters

value System.Object requiredposition: 0
The value to compare against.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WhenStartsWith(String value) #
Returns: EmailTableCondition

Sets the comparison operator to starts with (for strings).

Parameters

value System.String requiredposition: 0
The value to search for.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithAlignment(Alignment alignment) #
Returns: EmailTableCondition

Sets the alignment to apply when condition is met.

Parameters

alignment HtmlForgeX.Email.Alignment requiredposition: 0
The alignment value.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithBackgroundColor(String color) #
Returns: EmailTableCondition

Sets the background color to apply when condition is met.

Parameters

color System.String requiredposition: 0
The background color value.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithColor(String color) #
Returns: EmailTableCondition

Sets the text color to apply when condition is met.

Parameters

color System.String requiredposition: 0
The color value.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithFailBackgroundColor(String color) #
Returns: EmailTableCondition

Sets the fail background color (applied when condition is NOT met).

Parameters

color System.String requiredposition: 0
The background color value.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithFailColor(String color) #
Returns: EmailTableCondition

Sets the fail text color (applied when condition is NOT met).

Parameters

color System.String requiredposition: 0
The text color value.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithFontSize(String size) #
Returns: EmailTableCondition

Sets the font size to apply when condition is met.

Parameters

size System.String requiredposition: 0
The font size value.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithFontStyle(FontStyle style) #
Returns: EmailTableCondition

Sets the font style to apply when condition is met.

Parameters

style HtmlForgeX.Email.FontStyle requiredposition: 0
The font style.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithFontWeight(FontWeight weight) #
Returns: EmailTableCondition

Sets the font weight to apply when condition is met.

Parameters

weight HtmlForgeX.Email.FontWeight requiredposition: 0
The font weight.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithHighlightHeaders(params String[] headers) #
Returns: EmailTableCondition

Sets headers to highlight when condition is met.

Parameters

headers System.String[] requiredposition: 0
The headers to highlight.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithRowHighlight(Boolean highlight = true) #
Returns: EmailTableCondition

Sets whether to highlight the entire row when condition is met.

Parameters

highlight System.Boolean = true optionalposition: 0
Whether to highlight the row.

Returns

The EmailTableCondition object, allowing for method chaining.

public EmailTableCondition WithTextDecoration(TextDecoration decoration) #
Returns: EmailTableCondition

Sets the text decoration to apply when condition is met.

Parameters

decoration HtmlForgeX.Email.TextDecoration requiredposition: 0
The text decoration.

Returns

The EmailTableCondition object, allowing for method chaining.

Properties

public String ColumnName { get; set; } #

Column name to apply the condition to.

public ComparisonOperator Operator { get; set; } #

Comparison operator.

public Object Value { get; set; } #

Value to compare against.

public Nullable<FontWeight> FontWeight { get; set; } #

Font weight to apply when condition is met.

public Nullable<TextDecoration> TextDecoration { get; set; } #

Text decoration to apply when condition is met.

public String TextColor { get; set; } #

Text color to apply when condition is met.

public String BackgroundColor { get; set; } #

Background color to apply when condition is met.

public String FontSize { get; set; } #

Font size to apply when condition is met.

public Nullable<FontStyle> FontStyle { get; set; } #

Font style to apply when condition is met.

public Nullable<Alignment> Alignment { get; set; } #

Alignment to apply when condition is met.

public String FailBackgroundColor { get; set; } #

Background color to apply when condition is NOT met (fail color).

public String FailTextColor { get; set; } #

Text color to apply when condition is NOT met (fail color).

public Boolean HighlightRow { get; set; } #

Whether to highlight the entire row when condition is met.

public List<String> HighlightHeaders { get; set; } #

Headers to highlight when condition is met.