Hello,
I have a SfRoator which shows 3 images, with NavigationStripMode set to "Dots". after loading the page the dots won't display and only one image (the one corresponding to the index) is loaded, but after one swipe the other images are loaded and the dots will display as expected. I have also noticed, when saving the XAML file and doing Hot Reload, the control will load without any issue.
<StackLayout>
<rotator:SfRotator HeightRequest="300"
HorizontalOptions="CenterAndExpand"
ItemsSource="{Binding MyShop.Images}"
NavigationDirection="Horizontal"
EnableLooping="True"
EnableSwiping="True"
SelectedIndex="1"
NavigationStripMode="Dots">
<rotator:SfRotator.ItemTemplate>
<DataTemplate>
<Frame Padding="0"
BackgroundColor="#124653">
<Image Source="{Binding Image}"
Aspect="AspectFill" />
</Frame>
</DataTemplate>
</rotator:SfRotator.ItemTemplate>
</rotator:SfRotator>
</StackLayout>
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
BindingContext = new MainPageViewModel();
}
}
public class MainPageViewModel
{
public MainPageViewModel()
{
MyShop = new Shop();
MyShop.Images = new ObservableCollection<RotatorModel>()
{
new RotatorModel("MyShop1.png"),
new RotatorModel("MyShop2.png"),
new RotatorModel("MyShop3.png"),
};
}
public Shop MyShop
{
get; set;
}
}
public class Shop
{
public ObservableCollection<RotatorModel> Images
{
get; set;
}
}
public class RotatorModel
{
public RotatorModel(string imageString)
{
Image = imageString;
}
public String Image
{
get; set;
}
}