V4 V5

Leading rows and columns can be pinned so that scrolling does not move them.

Row 1 and column A frozen; the headers stay put while scrolling

Setting it

control.SetFreeze(rows: 1, cols: 0);   // freeze row 1
control.SetFreeze(1, 1);               // freeze row 1 and column A
control.SetFreeze(0, 0);               // unfreeze

The same API on all three controls (WinForms, WPF and Avalonia).

Working with the viewport directly, it is viewport.FrozenRows / viewport.FrozenCols.

using unvell.ReoGrid.Core;
using unvell.ReoGrid.Core.Rendering;

viewport.FrozenRows = 1;      // freeze row 1
viewport.FrozenCols = 1;      // freeze column A

// size of the frozen area in logical pixels; only the rest scrolls
double h = viewport.FrozenHeight;
double w = viewport.FrozenWidth;

double scrollableH = viewport.ScrollableContentHeight;
double scrollableW = viewport.ScrollableContentWidth;

It is view state

V4 kept this on the model, as worksheet.FreezeToCell(r, c) plus a FreezeArea enum. In V5 it is view state.

That has consequences.

  • Showing one worksheet through several views gives each its own freeze
  • It is irrelevant headless (nothing is drawn)
  • It is not saved yet — reopening a file comes back unfrozen

Persisting a per-sheet freeze position is future work.

Relationship to scrolling

The frozen area is always drawn; only the scrollable part moves.

PropertyWhat it is
viewport.FrozenHeight / FrozenWidthThe frozen area’s size
viewport.ScrollableContentHeight / ScrollableContentWidthThe scrolling part’s size

Relationship to printing

Freezing is for the screen and has no effect on printing. To repeat the leading rows on every page, use print titles (PrintSettings.RepeatRows / RepeatColumns) instead (Printing and Page Setup).

Was this article helpful?