VirtualList Class

Creates a collection of very large data sets, slow-acquiring data, or a combination of both. A virtual list is request based; the entire list is not loaded, but rather portions of it are loaded, allowing you to work with very large sets of data.

public class VirtualList : ModelItem, System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable

Public Instance Constructors

ConstructorDescription
VirtualList()Initializes a new instance of the VirtualList class.
VirtualList(ItemCountHandler)Initializes a new instance of the VirtualList class.
VirtualList(IModelItemOwner, ItemCountHandler)Initializes a new instance of the VirtualList class.

Public Instance Methods

MethodDescription
AddAdds an item to the end of the list.
ClearEmpties the contents of the list.
ContainsDetermines whether a given item is in the list.
CopyToCopies the contents of this list to an array.
GetEnumeratorGets an IEnumerator object for this collection.
IndexOfDetermines the index of a specific item in the list.
InsertInserts an item at the specified index.
IsItemAvailableDetermines whether an item at the specified index is available for query (the item can be located by index).
ModifiedIndicates that the item at the given index has been modified, but the new value is not yet known.
MoveMoves an item to a different location within the list.
RemoveRemoves the specified item from the list.
RemoveAtRemoves the item at the specified index.
RequestItemRequests an item from the specified index.

Protected Instance Methods

MethodDescription
ContainsDataForIndexDetermines whether a specified index has a corresponding data item in the list.
DisposeReleases all the resources used by VirtualList.
OnRequestItemGets the item at the specified index.
OnRequestSlowDataGets an item that is slow to acquire.
OnVisualsCreatedNotifies derived classes that the visual elements associated with the item in the specified index have been created.
OnVisualsReleasedNotifies derived classes that the visual elements associated with the item in the specified index have been released.

Public Instance Properties

PropertyDescription
CountGets or sets the number of items in the VirtualList object.
EnableSlowDataRequestsGets or sets a value that indicates whether the slow data requests feature is enabled.
IsFixedSizeGets a value that indicates whether the VirtualList object is a fixed size.
IsReadOnlyGets a value that indicates whether the VirtualList object is read-only.
IsSynchronizedGets a value that indicates whether the VirtualList object is thread-safe.
ItemGets or sets an item from the VirtualList object.
RequestItemHandlerGets or sets the item query handler, which allows for customized "get" logic without deriving and overriding the OnRequestItem method.
RequestSlowDataHandlerGets or sets the event handler, which is raised when one of the items has been displayed on screen and is ready for deferred (partial) data updates.
StoreQueryResultsDetermines whether the result of a RequestItem query should be stored in the VirtualList, which causes future queries to be faster.
SyncRootGets the thread synchronization root.
UnavailableItemGets the object from a RequestItem query to inform the caller that the item cannot be retrieved.
VisualReleaseBehaviorGets or sets the policy for data items after the visual items that were created for that item have been released.

Remarks

This class also includes services for slow partial data loads.

Requirements

Reference: Microsoft.MediaCenter.UI

Namespace: Microsoft.MediaCenter.UI

Assembly: Microsoft.MediaCenter.UI.dll

Platform: Windows Vista Ultimate, Windows Vista Home Premium, and later

See Also

Page view tracker