SetContentView(Resource.Layout.activity_main);
SfRotator rotator = FindViewById<SfRotator>(Resource.Id.sfRotator1);
List<SfRotatorItem> rotatorItems = new List<SfRotatorItem>();
List<int> images = new List<int>();
images.Add(Resource.Drawable.movie1);
images.Add(Resource.Drawable.movie2);
images.Add(Resource.Drawable.movie3);
for (int i = 0; i < images.Count; i++)
{
SfRotatorItem sfRotatorItem = new SfRotatorItem(this);
ImageView imageView = new ImageView(this);
imageView.SetImageResource(images[i]);
sfRotatorItem.Content = imageView;
rotatorItems.Add(sfRotatorItem);
}
rotator.DataSource = rotatorItems;
|