-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
71 lines (70 loc) · 3 KB
/
MainPage.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
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
69
70
71
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:collectionViewScroll="clr-namespace:CollectionViewScroll"
x:Class="CollectionViewScroll.MainPage">
<Grid>
<CollectionView
x:Name="ItemsCollectionView"
Grid.Row="0"
IsGrouped="True">
<CollectionView.GroupHeaderTemplate>
<DataTemplate x:DataType="collectionViewScroll:ItemModelGroup">
<Grid
RowDefinitions="35,1"
Padding="0,10,0,0"
BackgroundColor="LightGray">
<Label
Grid.Row="0"
Text="{Binding Name}"
FontAttributes="Bold"
Margin="0,5" />
</Grid>
</DataTemplate>
</CollectionView.GroupHeaderTemplate>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="collectionViewScroll:ItemModel">
<Grid RowDefinitions="15,125,15,1">
<Grid
Grid.Row="1"
RowDefinitions="Auto, Auto, *"
ColumnDefinitions="120, *"
ColumnSpacing="15">
<BoxView
Grid.Row="0"
Grid.RowSpan="3"
WidthRequest="120"
HeightRequest="120"
Color="Grey" />
<Label
Grid.Row="0"
Grid.Column="1"
Text="{Binding Text}"
FontAttributes="Bold" />
<Label
Grid.Row="1"
Grid.Column="1"
Text="{Binding Price, StringFormat='{0:N2}'}"
Margin="0,5" />
<Label
Grid.Row="2"
Grid.Column="1"
Text="{Binding Description}"
FontSize="12"
FontAttributes="Italic"
VerticalOptions="End" />
</Grid>
<BoxView HeightRequest="1" Grid.Row="3" BackgroundColor="Black" />
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Label
x:Name="Label"
Grid.Row="0"
TextColor="Red"
FontSize="20"
VerticalOptions="Center"
HorizontalOptions="Center" />
</Grid>
</ContentPage>