Class
PrintArea

Manages the collection of cell ranges to be printed, allowing multiple non-contiguous areas to be specified for printing.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model.Printing

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class PrintArea : CellRangeInsertedOrRemovedAwareOrderedCollection

Inheritance: objectCellRangeInsertedOrRemovedAwareCollectionBaseCellRangeInsertedOrRemovedAwareOrderedCollectionPrintArea

Inherited Members CellRangeInsertedOrRemovedAwareOrderedCollection.TranslateRange(CellRange, CellRange)CellRangeInsertedOrRemovedAwareOrderedCollection.RangesListCellRangeInsertedOrRemovedAwareOrderedCollection.CellRangesCellRangeInsertedOrRemovedAwareCollectionBase.CanInsertOrRemove(ShiftType, CellRange, CellRange)CellRangeInsertedOrRemovedAwareCollectionBase.ShouldTranslateUpDown(RangeType)CellRangeInsertedOrRemovedAwareCollectionBase.ShouldTranslateLeftRight(RangeType)CellRangeInsertedOrRemovedAwareCollectionBase.TranslateRanges(Dictionary<CellRange, CellRange>)CellRangeInsertedOrRemovedAwareCollectionBase.Cells

Properties

HasPrintAreaRanges

Gets whether any print area ranges have been defined, indicating that only specific areas will be printed.

Declaration

cs-api-definition
public bool HasPrintAreaRanges { get; }

Property Value

bool

The value indicating whether there are print ranges.

Ranges

Gets the cell ranges currently configured for printing.

Declaration

cs-api-definition
public IEnumerable<CellRange> Ranges { get; }

Property Value

IEnumerable<CellRange>

The ranges to print.

Methods

CanAddToPrintArea(CellRange)

Determines whether the specified range can be added without intersecting with existing print ranges.

Declaration

cs-api-definition
public bool CanAddToPrintArea(CellRange range)

Parameters

range

CellRange

The range.

Returns

bool

The value indicating wheter the specified range can be added.

CanAddToPrintArea(IEnumerable<CellRange>)

Determines whether the specified ranges can be added without intersecting with existing print ranges.

Declaration

cs-api-definition
public bool CanAddToPrintArea(IEnumerable<CellRange> ranges)

Parameters

ranges

IEnumerable<CellRange>

The ranges.

Returns

bool

The value indicating wheter the specified ranges can be added.

Clear()

Removes all print area ranges, reverting to printing the entire used worksheet area.

Declaration

cs-api-definition
public void Clear()

Insert(int, CellRange)

Inserts the specified index.

Declaration

cs-api-definition
protected override void Insert(int index, CellRange range)

Parameters

index

int

The index.

range

CellRange

The range.

Overrides CellRangeInsertedOrRemovedAwareOrderedCollection.Insert(int, CellRange)

OnAfterTranslation(Dictionary<CellRange, CellRange>, CellRange, ShiftType)

Called after translation.

Declaration

cs-api-definition
protected override void OnAfterTranslation(Dictionary<CellRange, CellRange> oldAndNewTranslatedRangesPositions, CellRange rangeToInsertOrRemove, ShiftType shiftType)

Parameters

oldAndNewTranslatedRangesPositions

Dictionary<CellRange, CellRange>

The old and new translated ranges positions.

rangeToInsertOrRemove

CellRange

The range to insert or remove.

shiftType

ShiftType

Type of the shift.

Overrides CellRangeInsertedOrRemovedAwareCollectionBase.OnAfterTranslation(Dictionary<CellRange, CellRange>, CellRange, ShiftType)

OnBeforeTranslation(Dictionary<CellRange, CellRange>, CellRange, ShiftType)

Called before translation.

Declaration

cs-api-definition
protected override void OnBeforeTranslation(Dictionary<CellRange, CellRange> oldAndNewTranslatedRangesPositions, CellRange rangeToInsertOrRemove, ShiftType shiftType)

Parameters

oldAndNewTranslatedRangesPositions

Dictionary<CellRange, CellRange>

The old and new translated ranges positions.

rangeToInsertOrRemove

CellRange

The range to insert or remove.

shiftType

ShiftType

Type of the shift.

Overrides CellRangeInsertedOrRemovedAwareCollectionBase.OnBeforeTranslation(Dictionary<CellRange, CellRange>, CellRange, ShiftType)

RemoveCellRangeAt(int)

Removes the cell range at.

Declaration

cs-api-definition
protected override void RemoveCellRangeAt(int index)

Parameters

index

int

The index.

Overrides CellRangeInsertedOrRemovedAwareOrderedCollection.RemoveCellRangeAt(int)

SetPrintArea(CellRange)

Replaces all existing print ranges with a single specified range.

Declaration

cs-api-definition
public void SetPrintArea(CellRange range)

Parameters

range

CellRange

The range.

SetPrintArea(IEnumerable<CellRange>)

Replaces all existing print ranges with the specified collection of ranges.

Declaration

cs-api-definition
public void SetPrintArea(IEnumerable<CellRange> ranges)

Parameters

ranges

IEnumerable<CellRange>

The ranges.

TryAddToPrintArea(CellRange)

Attempts to add a range to the print area if it does not intersect with existing ranges, and returns whether the operation succeeded.

Declaration

cs-api-definition
public bool TryAddToPrintArea(CellRange range)

Parameters

range

CellRange

The range.

Returns

bool

TryAddToPrintArea(IEnumerable<CellRange>)

Attempts to add multiple ranges to the print area if they do not intersect with existing ranges, and returns whether the operation succeeded.

Declaration

cs-api-definition
public bool TryAddToPrintArea(IEnumerable<CellRange> ranges)

Parameters

ranges

IEnumerable<CellRange>

The ranges.

Returns

bool