Interface IVirtualizingScrollInfo
- Namespace
- Icy.UI
- Assembly
- IcyUI.dll
Lets a ScrollViewer delegate extent/offset/viewport handling to its Content, instead of fully measuring and arranging it, when that content can realize only the portion of itself that's actually visible.
public interface IVirtualizingScrollInfo
- Extension Methods
Remarks
Mirrors WPF's ScrollViewer → IScrollInfo → VirtualizingStackPanel delegation. IcyUI has
no separate virtualizing-panel type - ItemsControl implements this interface
directly, since nothing else in the roadmap needs virtualized layout independent of an items list.
Properties
ExtentHeight
Gets this content's full natural height, estimated or exact depending on how much of it has actually been measured so far.
float ExtentHeight { get; }
Property Value
ExtentWidth
Gets this content's full natural width, estimated or exact depending on how much of it has actually been measured so far.
float ExtentWidth { get; }
Property Value
Methods
OnViewportChanged(float, float, float, float)
Called by the host ScrollViewer whenever the offset or viewport size it's presenting this content through may have changed - the single point where this content decides what to realize, de-realize, and how to position it.
void OnViewportChanged(float horizontalOffset, float verticalOffset, float viewportWidth, float viewportHeight)
Parameters
horizontalOffsetfloatHow far the viewport is scrolled horizontally.
verticalOffsetfloatHow far the viewport is scrolled vertically.
viewportWidthfloatThe visible viewport's width.
viewportHeightfloatThe visible viewport's height.
Events
ScrollToVerticalOffsetRequested
Occurs when this content asks its host ScrollViewer to scroll to an absolute vertical offset - for example to bring one of its items into view (see ScrollIntoView(int)).
event EventHandler<float>? ScrollToVerticalOffsetRequested
Event Type
Remarks
The event's float payload is the new VerticalOffset, not a delta. The host clamps it to its scrollable range.
VerticalOffsetCorrectionRequested
Occurs when this content needs its host ScrollViewer to adjust VerticalOffset by a specific amount, so on-screen content doesn't visibly jump when something already realized (and positioned above the current viewport) changes size.
event EventHandler<float>? VerticalOffsetCorrectionRequested
Event Type
Remarks
The event's float payload is the delta to apply
(VerticalOffset += delta), not an absolute new value.