Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

ChunkList(Int32, Boolean) Constructor

Initializes a new instance of the ChunkList<T> class.

Namespace: DevExpress.Xpf.ChunkList

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public ChunkList(
    int capacity,
    bool useChunksCache = false
)

#Parameters

Name Type Description
capacity Int32

The approximate number of items in the data source.

#Optional Parameters

Name Type Default Description
useChunksCache Boolean False

true, to store chunk indexes for collection items in a special hash table; otherwise, false.

#Remarks

The chunk size is calculated based on the value of the capacity parameter:

int chunkSize = Math.Sqrt(capacity);

If the useChunksCache parameter is set to true, the ChunkList<T> instance will store chunk indexes for collection items in a special hash table. The hash table will take up additional memory, but chunk indexes for items will be retrieved almost instantly.

See Also