Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148475 | Oct 21,2019 07:30 PM UTC | Oct 25,2019 04:11 AM UTC | Xamarin.Forms | 7 |
![]() |
Tags: SfRotator |
<navigationdrawer:SfNavigationDrawer.DrawerHeaderView>
<rotator:SfRotator ItemsSource="{Binding ImageCollection}"
NavigationDirection="Horizontal"
NavigationStripMode="Dots"
BackgroundColor="#ececec">
<rotator:SfRotator.ItemTemplate>
<DataTemplate>
<Image Source="{Binding Image}"/>
</DataTemplate>
</rotator:SfRotator.ItemTemplate>
</rotator:SfRotator>
</navigationdrawer:SfNavigationDrawer.DrawerHeaderView> |
private List<SfRotatorItem> imageCollection = new List<SfRotatorItem>();
public List<SfRotatorItem> ImageCollection
{
get { return imageCollection; }
set { imageCollection = value; }
}
public RotatorViewModel()
{
ImageCollection.Add(new SfRotatorItem() { Image = "movie1.png" });
ImageCollection.Add(new SfRotatorItem() { Image = "movie2.png" });
ImageCollection.Add(new SfRotatorItem() { Image = "movie3.png" });
} |
<navigationdrawer:SfNavigationDrawer.DrawerHeaderView>
<rotator:SfRotator HeightRequest="200"
ItemsSource="{Binding ImageCollection}"
NavigationDirection="Horizontal"
NavigationStripMode="Dots"
BackgroundColor="#ececec">
</rotator:SfRotator>
</navigationdrawer:SfNavigationDrawer.DrawerHeaderView> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.