-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCollectionViewChallengePage.xaml
More file actions
68 lines (68 loc) · 4.48 KB
/
CollectionViewChallengePage.xaml
File metadata and controls
68 lines (68 loc) · 4.48 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?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"
mc:Ignorable="d"
x:Class="CollectionViewChallenge.Views.CollectionViewChallengePage">
<ContentPage.Content>
<StackLayout>
<StackLayout Orientation="Horizontal">
<Picker Title="Select Listtype" x:Name="CVPicker" SelectedIndexChanged="CVPicker_SelectedIndexChanged" HorizontalOptions="FillAndExpand"/>
<Picker Title="Select Layout" x:Name="CVPickerLayout" SelectedIndexChanged="CVPickerLayout_SelectedIndexChanged" HorizontalOptions="FillAndExpand"/>
</StackLayout>
<StackLayout Orientation="Horizontal" HorizontalOptions="FillAndExpand">
<Picker Title="Select Enabling" x:Name="CVPickerEnabled" SelectedIndexChanged="CVPickedEnabled_SelectedIndexChanged" HorizontalOptions="FillAndExpand"/>
<Picker Title="Scroll To" x:Name="ScrollToPicker" SelectedIndexChanged="ScrollToPicker_SelectedIndexChanged" HorizontalOptions="FillAndExpand"/>
</StackLayout>
<CollectionView x:Name="CollectionListViewV" IsVisible="True" BackgroundColor="Transparent" SelectionMode="Single" SelectionChanged="CollectionListViewV_SelectionChanged">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame BorderColor="LightGray" CornerRadius="3" HasShadow="False">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<StackLayout Orientation="Horizontal" Margin="2,2,2,2">
<Image Grid.Row="0" Grid.Column="0" Source="{Binding LVImage}" Aspect="Fill" VerticalOptions="Center"/>
<Label Grid.Row="0" Grid.Column="1" Text="{Binding LVName}" FontSize="Default" TextColor="Black" VerticalOptions="Center"/>
</StackLayout>
</Grid>
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<CollectionView x:Name="CollectionListViewH" IsVisible="False" BackgroundColor="Transparent" SelectionMode="Multiple" SelectionChanged="CollectionListViewH_SelectionChanged">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Horizontal" Span="2"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame BorderColor="LightGray" CornerRadius="3" HasShadow="False">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<StackLayout Orientation="Horizontal" Margin="2,2,2,2">
<Image Grid.Row="0" Grid.Column="0" Source="{Binding LVImage}" Aspect="Fill" VerticalOptions="Center"/>
<Label Grid.Row="0" Grid.Column="1" Text="{Binding LVName}" FontSize="Default" TextColor="Black" VerticalOptions="Center"/>
</StackLayout>
</Grid>
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</StackLayout>
</ContentPage.Content>
</ContentPage>