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 ModelIt, System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable
Public Instance Constructors
| Constructor | Description |
| 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
| Method | Description |
| Add | Adds an item to the end of the list. |
| Clear | Empties the contents of the list. |
| Contains | Determines whether a given item is in the list. |
| CopyTo | Copies the contents of this list to an array. |
| GetEnumerator | Gets an IEnumerator object for this collection. |
| IndexOf | Determines the index of a specific item in the list. |
| Insert | Inserts an item at the specified index. |
| IsItemAvailable | Determines whether an item at the specified index is available for query (the item can be located by index). |
| Modified | Indicates that the item at the given index has been modified, but the new value is not yet known. |
| Move | Moves an item to a different location within the list. |
| Remove | Removes the specified item from the list. |
| RemoveAt | Removes the item at the specified index. |
| RequestItem | Requests an item from the specified index. |
Protected Instance Methods
| Method | Description |
| ContainsDataForIndex | Determines whether a specified index has a corresponding data item in the list. |
| Dispose | Releases all the resources used by VirtualList. |
| OnRequestItem | Gets the item at the specified index. |
| OnRequestSlowData | Gets an item that is slow to acquire. |
| OnVisualsCreated | Notifies derived classes that the visual elements associated with the item in the specified index have been created. |
| OnVisualsReleased | Notifies derived classes that the visual elements associated with the item in the specified index have been released. |
Public Instance Properties
| Property | Description |
| Count | Gets or sets the number of items in the VirtualList object. |
| EnableSlowDataRequests | Gets or sets a value that indicates whether the slow data requests feature is enabled. |
| IsFixedSize | Gets a value that indicates whether the VirtualList object is a fixed size. |
| IsReadOnly | Gets a value that indicates whether the VirtualList object is read-only. |
| IsSynchronized | Gets a value that indicates whether the VirtualList object is thread-safe. |
| Item | Gets or sets an item from the VirtualList object. |
| RequestItemHandler | Gets or sets the item query handler, which allows for customized "get" logic without deriving and overriding the OnRequestItem method. |
| RequestSlowDataHandler | Gets 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. |
| StoreQueryResults | Determines whether the result of a RequestItem query should be stored in the VirtualList, which causes future queries to be faster. |
| SyncRoot | Gets the thread synchronization root. |
| UnavailableItem | Gets the object from a RequestItem query to inform the caller that the item cannot be retrieved. |
| VisualReleaseBehavior | Gets 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