diff --git a/README.md b/README.md index 9127e01..187d9c6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,66 @@ # How to animate the listview items? This example demonstrates how to the animation the listview items while scrolling. +## Sample + +```xaml + + + + + + + + + . . . + . . . + + + + + + + public class ItemGeneratorExt : ItemGenerator + { + public ItemGeneratorExt(SfListView listview) : base(listview) + { + + } + protected override ListViewItem OnCreateListViewItem(int itemIndex, ItemType type, object data = null) + { + if (type == ItemType.Record) + return new ListViewItemExt(); + return base.OnCreateListViewItem(itemIndex, type, data); + } + } + public class ListViewItemExt : ListViewItem + { + public ListViewItemExt() + { + } + protected override void OnItemAppearing() + { + this.Opacity = 0; + this.FadeTo(1, 400, Easing.SinInOut); + base.OnItemAppearing(); + } + } + +listView.ItemGenerator = new ItemGeneratorExt(listView); +``` + ## Requirements to run the demo ##