API Reference
EmailTextWrapMode
Defines different text wrapping behaviors for email components. Controls how long words and method names break and wrap within containers.
Inheritance
- Enum
- EmailTextWrapMode
Inherited Methods
public override sealed Int32 CompareTo(Object target) #Int32Parameters
- target Object
public override sealed String ToString(String format, IFormatProvider provider) #StringObsolete("The provider argument is not used. Use ToString(String) instead.")Parameters
- format String
Values
public const EmailTextWrapMode Default #Default wrapping - allows breaking anywhere in long words. Uses: word-wrap: break-word; overflow-wrap: break-word; Best for: General text content that needs to fit in containers.
0public const EmailTextWrapMode Natural #Natural wrapping - only breaks at natural word boundaries. Uses: word-break: normal; overflow-wrap: normal; Best for: Code, method names, URLs that should stay intact. Example: "ConfigureImageOptimization" stays on one line if possible.
1public const EmailTextWrapMode Aggressive #Aggressive wrapping - breaks anywhere, even mid-character. Uses: word-break: break-all; overflow-wrap: break-word; Best for: Very narrow columns or when space is extremely limited.
2public const EmailTextWrapMode Preserve #Preserve formatting - maintains exact whitespace and prevents wrapping. Uses: white-space: pre; overflow-wrap: normal; Best for: Code blocks, preformatted text, exact spacing requirements.
3public const EmailTextWrapMode Hyphenated #Hyphenated wrapping - breaks with hyphens where possible. Uses: word-wrap: break-word; hyphens: auto; Best for: Professional documents, long words that benefit from hyphenation. Note: Hyphenation support varies by email client.
4public const EmailTextWrapMode Smart #Smart wrapping - tries to keep method names and camelCase intact. Uses: word-break: keep-all; overflow-wrap: break-word; Best for: Technical documentation, API references, code examples.
5Extension Methods
public static String GetDescription(EmailTextWrapMode wrapMode) #StringGets a description of what the wrap mode does.
Parameters
- wrapMode HtmlForgeX.Email.EmailTextWrapMode
- The wrap mode to describe.
Returns
A human-readable description of the wrap mode behavior.
public static String GetExamples(EmailTextWrapMode wrapMode) #StringGets example use cases for the wrap mode.
Parameters
- wrapMode HtmlForgeX.Email.EmailTextWrapMode
- The wrap mode to get examples for.
Returns
Example use cases as a string.
public static String ToCssProperties(EmailTextWrapMode wrapMode) #StringConverts the EmailTextWrapMode to CSS properties for text wrapping.
Parameters
- wrapMode HtmlForgeX.Email.EmailTextWrapMode
- The wrap mode to convert.
Returns
CSS properties as a string for the specified wrap mode.