Xamarin : Create Carousel Page
Steps
- Create new page
- Change "ContentPage" to "CarouselPage" on the first line of the design code
- Create multiple "ContentPage" tags, that how many you want carousel pages
- write design and code in "<StackLayout>" tag
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="App1.CarasoulSample"> <ContentPage> <StackLayout> <Label Text="I am Red color" VerticalOptions="Start" HorizontalTextAlignment="Center" FontSize="Large" FontAttributes="Bold" TextColor="Red" /> <BoxView Color="Red" VerticalOptions="FillAndExpand"></BoxView> </StackLayout> </ContentPage> <ContentPage> <StackLayout> <Label Text="I am Blue color" VerticalOptions="Start" HorizontalTextAlignment="Center" FontSize="Large" FontAttributes="Bold" TextColor="Blue" /> <BoxView Color="Blue" VerticalOptions="FillAndExpand"></BoxView> </StackLayout> </ContentPage> <ContentPage> <StackLayout> <Label Text="I am Green color" VerticalOptions="Start" HorizontalTextAlignment="Center" FontSize="Large" FontAttributes="Bold" TextColor="Green" /> <BoxView Color="Green" VerticalOptions="FillAndExpand"></BoxView> </StackLayout> </ContentPage> </CarouselPage>
No comments:
Post a Comment