Hello,
i am trying to understand the virtualisation technique in RadListView.
I am having a List with 30 Elements. 4 Elements are displayed at once.
I have a timer, that updates each item every minute. This update is rather slow but calculation is fast.
For each view model of those elements i raise one property changed event.
I hooked into the ListViewRenderer
public
class
ListViewExRenderer : ListViewRenderer
{
protected
override
NSObject CreateDataSource(RadListView radListView)
{
return
new
ListViewExDataSource(radListView);
}
class
ListViewExDataSource : ListViewDataSource
{
public
ListViewExDataSource(RadListView view)
:
base
(view)
{
}
protected
override
TelerikUI.TKListViewCell CreateCellForItem(TelerikUI.TKListView listView, NSIndexPath indexPath, NSObject obj)
{
return
base
.CreateCellForItem(listView, indexPath, obj);
}
}
}
I set a breakpoint in CreateCellForItem. This is hit 30 times at the beginning, for all elements in the list. Then, it is hit again 4 times for the first items to be displayed. This is rather odd. I thought it would hit 4 times, and when i started scrolling, it would hit again for items that appearing. Any thoughts?