Pops the specified item to the head of the queue.
Namespace:
Aurigma.GraphicsMill.WinControls
Assembly:
Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)
Public Sub MoveToHead ( _ item As IQueueItem, _ methodIndex As Integer _ )
public void MoveToHead( IQueueItem item, int methodIndex )
Type: Aurigma.GraphicsMill.WinControls.IQueueItem
An item implementing the IQueueItem interface which should be moved to the head of the queue.Type: System.Int32
An index of a method which will be called for the queue.Use this method to ensure that the item load its data (i.e. EvaluateMethod(Int32) executes) as soon as possible. It is important when you are going to have a lot of items in a control and want to load thumbnails or other item details by demand. For example, when the user loads 500 items, the queue is organized the same order as they are appear on the screen. If the user scrolls the control to, say, 400th item, he/she would not like to wait until all invisible items before 400th one will be loaded. The user expects that priority of visible items will be increased.
To provide such behavior it is recommended to call this method when the control requests a thumbnail (i.e. in GetIconKey(View) method implementation). This way when the user scrolls the control and items start repainting, the control calls the GetIconKey(View). If no thumbnail available, you should pop this item to the head of the queue. This way you increase the priority of visible items.
Keep in mind, the ThumbnailListItem class already implements this approach. You need to use QueueManager only if you are creating your own list item class (i.e. implement IListItem and IQueueItem interfaces yourself).
It is recommended to start queues execution via StartQueues() method every time you move the item to the head.