WPF › Virtualizing Wrap Panel › AboutToRenderChildItemsEventArgs
AboutToRenderChildItemsEventArgs
class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Panels.VirtualizingWrapPanel
Provides the data for BinaryVirtualizingWrapPanel.AboutToRenderChildItems: the range
of items the panel is about to show.
public class AboutToRenderChildItemsEventArgs : EventArgs
Inherits from / implements: EventArgs
Examples
// Fetch the thumbnails of the photos about to come into view, before their tiles are drawn.
panel.AboutToRenderChildItems += (sender, e) =>
{
int first = (int)e.ChildItemIndicesToRender[0];
int last = (int)e.ChildItemIndicesToRender[1];
for (int index = first; index <= last; index++)
{
thumbnailCache.Request(photos[index].FilePath);
}
};Members at a glance
| Constructors | |
|---|---|
AboutToRenderChildItemsEventArgs | Creates the event data with an empty ChildItemIndicesToRender; the panel fills it
before raising the event. |
| Properties | |
ChildItemIndicesToRender | Gets the first and last index of the items about to be shown. |
Constructors
AboutToRenderChildItemsEventArgs
public AboutToRenderChildItemsEventArgs() : base()
Creates the event data with an empty ChildItemIndicesToRender; the panel fills it
before raising the event.
Properties
ChildItemIndicesToRender
public List<long> ChildItemIndicesToRender
Gets the first and last index of the items about to be shown.
- Value
- A list of two zero-based indices into the items control's
Items: element 0 is the first item about to be shown and element 1 the last, inclusive. The last is never past the end of the list; with no items it is -1.