-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
IndicatorsSample.xaml
36 lines (36 loc) · 1.82 KB
/
IndicatorsSample.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Xamarin.Forms.Controls"
mc:Ignorable="d"
x:Class="Xamarin.Forms.Controls.IndicatorsSample">
<ContentPage.Resources>
<OnPlatform x:Key="IonicsFontFamily" x:TypeArguments="x:String">
<On Platform="iOS" Value="Ionicons" />
<On Platform="Android" Value="fonts/ionicons.ttf#" />
<On Platform="UWP" Value="Assets/Fonts/ionicons.ttf#ionicons" />
</OnPlatform>
<x:String x:Key="Indicator"></x:String>
</ContentPage.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<CarouselView x:Name="carousel" ItemsSource="{Binding Items}" Grid.Row="0" Grid.RowSpan="3" IndicatorView="indicators">
<CarouselView.ItemTemplate>
<DataTemplate>
<Frame BackgroundColor="{Binding Color}">
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Label Text="{Binding Name}" FontSize="25"></Label>
</Grid>
</Frame>
</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
<IndicatorView x:Name="indicators" Grid.Row="1" IndicatorColor="Gray" SelectedIndicatorColor="White" HorizontalOptions="Center" />
</Grid>
</ContentPage>