Class ConditionalFormats
Collection of conditional formats for the single-cell range.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.NET.dll
Syntax
public class ConditionalFormats : CollectionBaseEx<IConditionalFormat>, IList<IConditionalFormat>, ICollection<IConditionalFormat>, IEnumerable<IConditionalFormat>, ICloneParent, IConditionalFormats, IEnumerable, IParentApplication, IOptimizedUpdate
Constructors
ConditionalFormats(IApplication, Object)
Creates new instance.
Declaration
public ConditionalFormats(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Base application. |
System.Object | parent | Parent object. |
ConditionalFormats(IApplication, Object, ConditionalFormats)
Creates new instance.
Declaration
public ConditionalFormats(IApplication application, object parent, ConditionalFormats toClone)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Base application. |
System.Object | parent | Parent object. |
ConditionalFormats | toClone | Collection to clone. |
ConditionalFormats(IApplication, Object, ConditionalFormats, Boolean)
Copy Conditional format.
Declaration
public ConditionalFormats(IApplication application, object parent, ConditionalFormats toClone, bool bCopy)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Base application. |
System.Object | parent | Parent object. |
ConditionalFormats | toClone | Collection to clone. |
System.Boolean | bCopy | boolean value to copy conditional format |
ConditionalFormats(IApplication, Object, CondFmt12Record, IList)
Creates ConditionalFormats collection from array of BiffRecords.
Declaration
public ConditionalFormats(IApplication application, object parent, CondFmt12Record format, IList formats)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the collection. |
System.Object | parent | Parent object for the collection. |
CondFmt12Record | format | Main conditional format12 record. |
System.Collections.IList | formats | Array of CF12Records with conditional formats. |
ConditionalFormats(IApplication, Object, CondFMTRecord, IList, IList)
Creates ConditionalFormats collection from array of BiffRecords.
Declaration
public ConditionalFormats(IApplication application, object parent, CondFMTRecord format, IList formats, IList CFExRecords)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the collection. |
System.Object | parent | Parent object for the collection. |
CondFMTRecord | format | Main conditional format record. |
System.Collections.IList | formats | Array of CFRecords with conditional formats. |
System.Collections.IList | CFExRecords |
Fields
MAXIMUM_CF_NUMBER
Maximum number of conditional formats in the collection.
Declaration
public const int MAXIMUM_CF_NUMBER = 3
Field Value
Type |
---|
System.Int32 |
Properties
Address
Represents address of cf ranges.
Declaration
public string Address { get; }
Property Value
Type |
---|
System.String |
AddressR1C1
Represents address of cf ranges in R1C1 notation.
Declaration
public string AddressR1C1 { get; }
Property Value
Type |
---|
System.String |
CellRectangles
Gets list of rectangles describing cells with conditional formatting.
Declaration
public List<Rectangle> CellRectangles { get; }
Property Value
Type |
---|
System.Collections.Generic.List<Rectangle> |
CellsList
Returns all string ranges for this CF.
Declaration
public string[] CellsList { get; }
Property Value
Type |
---|
System.String[] |
CondFMT12Record
CondFMT record.
Declaration
public CondFmt12Record CondFMT12Record { get; set; }
Property Value
Type |
---|
CondFmt12Record |
CondFMTRecord
CondFMT record.
Declaration
public CondFMTRecord CondFMTRecord { get; set; }
Property Value
Type |
---|
CondFMTRecord |
EnclosedRange
Cell range address of the range enclosing all conditionally formatted ranges.
Declaration
public TAddr EnclosedRange { get; set; }
Property Value
Type |
---|
TAddr |
IsEmpty
Indicates whether collection is empty. Read-only.
Declaration
public bool IsEmpty { get; }
Property Value
Type |
---|
System.Boolean |
IsFutureRecord
Specify whether the record is future record.
Declaration
public bool IsFutureRecord { get; set; }
Property Value
Type |
---|
System.Boolean |
sheet
Get worksheet. Read only.
Declaration
public WorksheetImpl sheet { get; }
Property Value
Type |
---|
WorksheetImpl |
Methods
AddCells(ConditionalFormats)
Adds cells from the collection.
Declaration
public void AddCells(ConditionalFormats formats)
Parameters
Type | Name | Description |
---|---|---|
ConditionalFormats | formats | Formats collection to get cells from. |
AddCells(IList<Rectangle>)
Adds cells from the collection.
Declaration
public void AddCells(IList<Rectangle> arrCells)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IList<Rectangle> | arrCells | Cells to add to the collection. |
AddCellsCondFMT12(ConditionalFormats)
Adds cells from the collection.
Declaration
public void AddCellsCondFMT12(ConditionalFormats formats)
Parameters
Type | Name | Description |
---|---|---|
ConditionalFormats | formats | Formats collection to get cells from. |
AddCondition()
Adds new condition to the collection.
Declaration
public IConditionalFormat AddCondition()
Returns
Type |
---|
IConditionalFormat |
AddFromCF12Record(CF12Record)
Adds condition from CF12Record.
Declaration
public void AddFromCF12Record(CF12Record cf12)
Parameters
Type | Name | Description |
---|---|---|
CF12Record | cf12 | CF12Record that contains condition data. |
AddFromCFEXRecord(CFExRecord)
Adds condition from CFExRecord.
Declaration
public void AddFromCFEXRecord(CFExRecord cfEx)
Parameters
Type | Name | Description |
---|---|---|
CFExRecord | cfEx |
AddFromRecord(CFRecord)
Adds condition from CFRecord.
Declaration
public void AddFromRecord(CFRecord cf)
Parameters
Type | Name | Description |
---|---|---|
CFRecord | cf | CFRecord that contains condition data. |
AddRange(Rectangle)
Adds new cell range to the collection.
Declaration
public void AddRange(Rectangle rect)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | rect | Range to add. |
AddRange(IRange)
Adds range to the collection.
Declaration
public void AddRange(IRange range)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | Range to add. |
BeginUpdate()
This method should be called before several updates to the object will take place.
Declaration
public void BeginUpdate()
ClearCells()
Removes all cells from the collection.
Declaration
public void ClearCells()
Clone(Object)
Creates a new object that is a copy of the current instance.
Declaration
public override object Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object for a copy of this instance. |
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Overrides
CompareFormats(IConditionalFormat, IConditionalFormat)
Compares two ConditionalFormats.
Declaration
public bool CompareFormats(IConditionalFormat firstFormat, IConditionalFormat secondFormat)
Parameters
Type | Name | Description |
---|---|---|
IConditionalFormat | firstFormat | First conditional format to compare. |
IConditionalFormat | secondFormat | Second conditional format to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if they are equal. |
CompareTo(ConditionalFormats)
Compares this collection to another.
Declaration
public bool CompareTo(ConditionalFormats formats)
Parameters
Type | Name | Description |
---|---|---|
ConditionalFormats | formats | Collection to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if collections are equal. |
Contains(Rectangle[])
Indicates whether collection contains all specified ranges.
Declaration
public bool Contains(Rectangle[] arrRanges)
Parameters
Type | Name | Description |
---|---|---|
Rectangle[] | arrRanges | Ranges to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if collection contains all specified ranges. |
ContainsCount(Rectangle)
Returns contains count for specified range.
Declaration
public int ContainsCount(Rectangle range)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | range | Range to check. |
Returns
Type | Description |
---|---|
System.Int32 | Contains count |
ConvertToExcel97to03Version()
Converts collection to Excel97to03 version (reduces collection capacity to maximum three conditions).
Declaration
public void ConvertToExcel97to03Version()
EndUpdate()
This method should be called after several updates to the object took place.
Declaration
public void EndUpdate()
Equals(Object)
A hash code for the current Object without taking cell list into account.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The Object to compare with the current Object. |
Returns
Type |
---|
System.Boolean |
GetHashCode()
Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current Object. |
GetPart(Int32, Int32, Int32, Int32, Boolean, Int32, Int32, Object)
Creates ConditionaFormats collection containing part of conditional formats.
Declaration
public ConditionalFormats GetPart(int row, int column, int rowCount, int columnCount, bool remove, int rowIncrement, int columnIncrement, object newParent)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | Index of the first row to get. |
System.Int32 | column | Index of the first column to get. |
System.Int32 | rowCount | Number of rows to get. |
System.Int32 | columnCount | Number of columns to get. |
System.Boolean | remove | Indicates whether we should remove original items from the collection. |
System.Int32 | rowIncrement | This value should be added to row index of every CF region. |
System.Int32 | columnIncrement | This value should be added to column index of every CF region. |
System.Object | newParent | New parent object. |
Returns
Type | Description |
---|---|
ConditionalFormats | Created CF collection. |
MarkUsedReferences(Boolean[])
Sets items with used reference indexes to true.
Declaration
public void MarkUsedReferences(bool[] usedItems)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean[] | usedItems | Array to mark used references in. |
Remove()
Removes the Condtional Format at the specified range
Declaration
public void Remove()
Remove(Rectangle[])
Removes range from the collection of conditional formats.
Declaration
public void Remove(Rectangle[] arrRanges)
Parameters
Type | Name | Description |
---|---|---|
Rectangle[] | arrRanges | Array of ranges to remove. |
RemoveAt()
Removes the Condtional Format at the Specified Index
Declaration
public void RemoveAt()
Serialize(OffsetArrayList, UInt16, Int32)
Serializes collection data into OffsetArrayList.
Declaration
public int Serialize(OffsetArrayList records, ushort index, int priority)
Parameters
Type | Name | Description |
---|---|---|
OffsetArrayList | records | OffsetArrayList that will get all data. |
System.UInt16 | index | |
System.Int32 | priority |
Returns
Type |
---|
System.Int32 |
UpdateFormula(Int32, Int32, Rectangle, Int32, Rectangle)
Updates conditional format formulas.
Declaration
public void UpdateFormula(int iCurIndex, int iSourceIndex, Rectangle sourceRect, int iDestIndex, Rectangle destRect)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iCurIndex | Current worksheet index. |
System.Int32 | iSourceIndex | Source worksheet index. |
Rectangle | sourceRect | Source rectangle. |
System.Int32 | iDestIndex | Destination worksheet index. |
Rectangle | destRect | Destination rectangle. |
UpdateReferenceIndexes(Int32[])
Updates reference indexes.
Declaration
public void UpdateReferenceIndexes(int[] arrUpdatedIndexes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | arrUpdatedIndexes | Array with updated indexes. |