Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
144551 | May 11,2019 09:37 AM UTC | May 14,2019 05:43 AM UTC | Xamarin.Forms | 3 |
![]() |
Tags: SfRotator |
<ContentPage.Resources> <ResourceDictionary> <DataTemplate x:Key="RotatorTemplate"> <StackLayout Orientation="Vertical" HorizontalOptions="Center"> <Label Text="{Binding Name}" TextColor="Black" WidthRequest="150" VerticalTextAlignment="Center" /> <ContentPresenter Content="{Binding ItemTemplate}" /> </StackLayout> </DataTemplate> </ResourceDictionary> </ContentPage.Resources> <ContentPage.Content> <sf:SfRotator x:Name="rotator" ItemsSource="{Binding RotatorCollection,Mode=TwoWay }" ItemTemplate="{StaticResource RotatorTemplate}" NavigationDirection="Horizontal" NavigationStripMode="Dots" EnableSwiping="True" EnableLooping="False" VerticalOptions="CenterAndExpand" NavigationStripPosition="Bottom"> </sf:SfRotator> </ContentPage.Content> |
public class RotatorModel { public RotatorModel(string name, View itemTemplate) { Name = name; ItemTemplate = itemTemplate; } private String name; public String Name { get { return name; } set { name = value; } } private View itemTemplate; public View ItemTemplate { get { return itemTemplate; } set { itemTemplate = value; } } } |
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.