Class
WordTableConditionalFormattingBuilder
OfficeIMO.Word
Provides a fluent API for defining and applying multiple conditional formatting rules.
Inheritance
- object
- WordTableConditionalFormattingBuilder
Usage
Explore 2 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 2
Methods
AddRule 3 overloads
public WordTableConditionalFormattingBuilder AddRule(string columnName, string? matchText, WordTextMatchType matchType, OfficeColor? matchFillColor = null, OfficeColor? matchFontColor = null, OfficeColor? noMatchFillColor = null, OfficeColor? noMatchFontColor = null, bool ignoreCase = true, IEnumerable<string>? highlightColumns = null, Action<WordParagraph>? matchTextFormat = null, Action<WordParagraph>? noMatchTextFormat = null) #Adds a conditional formatting rule based on a column value.
Parameters
- columnName string
- matchText string?
- matchType OfficeIMO.Word.WordTextMatchType
- matchFillColor OfficeIMO.OfficeColor? = null
- matchFontColor OfficeIMO.OfficeColor? = null
- noMatchFillColor OfficeIMO.OfficeColor? = null
- noMatchFontColor OfficeIMO.OfficeColor? = null
- ignoreCase bool = true
- highlightColumns System.Collections.Generic.IEnumerable<string>? = null
- matchTextFormat System.Action<OfficeIMO.Word.WordParagraph>? = null
- noMatchTextFormat System.Action<OfficeIMO.Word.WordParagraph>? = null
public WordTableConditionalFormattingBuilder AddRule(IEnumerable<ValueTuple<string, string, WordTextMatchType>> conditions, bool matchAll, OfficeColor? matchFillColor = null, OfficeColor? matchFontColor = null, OfficeColor? noMatchFillColor = null, OfficeColor? noMatchFontColor = null, bool ignoreCase = true, IEnumerable<string>? highlightColumns = null, Action<WordParagraph>? matchTextFormat = null, Action<WordParagraph>? noMatchTextFormat = null) #Adds a conditional formatting rule based on multiple column values.
Parameters
- conditions System.Collections.Generic.IEnumerable<System.ValueTuple<string, string, OfficeIMO.Word.WordTextMatchType>>
- matchAll bool
- matchFillColor OfficeIMO.OfficeColor? = null
- matchFontColor OfficeIMO.OfficeColor? = null
- noMatchFillColor OfficeIMO.OfficeColor? = null
- noMatchFontColor OfficeIMO.OfficeColor? = null
- ignoreCase bool = true
- highlightColumns System.Collections.Generic.IEnumerable<string>? = null
- matchTextFormat System.Action<OfficeIMO.Word.WordParagraph>? = null
- noMatchTextFormat System.Action<OfficeIMO.Word.WordParagraph>? = null
public WordTableConditionalFormattingBuilder AddRule(Func<WordTableRow, bool> predicate, Action<WordTableRow> matchAction, Action<WordTableRow>? noMatchAction = null) #Adds a conditional formatting rule using a predicate.
Parameters
- predicate System.Func<OfficeIMO.Word.WordTableRow, bool>
- matchAction System.Action<OfficeIMO.Word.WordTableRow>
- noMatchAction System.Action<OfficeIMO.Word.WordTableRow>? = null
public void Apply() #Applies all configured rules to the table.