ConditionalStyle
public sealed class ConditionalStyle
Namespace SharpCell · package SharpCell
What a conditional format changes about a cell's look, as Excel's Format Cells for a rule sets it: the font's style and colour, the fill, the borders and the number format. A property left null keeps what the cell has. A record: with makes a changed copy.
Constructors
ConditionalStyle()
public ConditionalStyle()
A look that changes nothing; set properties in an initializer.
Properties
Bold
public bool? Bold { get; init; }
Bold, or not bold; null keeps the cell's.
BottomBorder
public CellBorder? BottomBorder { get; init; }
The bottom border; null keeps the cell's.
Fill
public CellColor? Fill { get; init; }
The fill colour; null keeps the cell's.
FontColor
public CellColor? FontColor { get; init; }
The text colour; null keeps the cell's.
GreenFill
public static ConditionalStyle GreenFill { get; }
A green fill with dark green text.
Italic
public bool? Italic { get; init; }
Italic, or not italic; null keeps the cell's.
LeftBorder
public CellBorder? LeftBorder { get; init; }
The left border; null keeps the cell's.
LightRedFill
public static ConditionalStyle LightRedFill { get; }
A light red fill with dark red text, Excel's first preset.
NumberFormat
public string? NumberFormat { get; init; }
The number format code, such as 0.00%; null keeps the cell's.
RightBorder
public CellBorder? RightBorder { get; init; }
The right border; null keeps the cell's.
Strikethrough
public bool? Strikethrough { get; init; }
Struck through, or not; null keeps the cell's.
TopBorder
public CellBorder? TopBorder { get; init; }
The top border; null keeps the cell's.
Underline
public CellUnderline? Underline { get; init; }
The underline; null keeps the cell's.
YellowFill
public static ConditionalStyle YellowFill { get; }
A yellow fill with dark yellow text.
Methods
ApplyTo(CellStyle)
public CellStyle ApplyTo(CellStyle style)
The style with what this one sets put over it.
Parameters
style: The cell's own style.