-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainPage.xaml
More file actions
40 lines (37 loc) · 1.77 KB
/
MainPage.xaml
File metadata and controls
40 lines (37 loc) · 1.77 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
<?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:local="clr-namespace:CollectionBorderRender"
x:Class="CollectionBorderRender.MainPage"
x:DataType="local:MainPage">
<ScrollView>
<VerticalStackLayout Padding="16" Spacing="16">
<CollectionView ItemsSource="{Binding Items}" MaximumHeightRequest="300">
<CollectionView.ItemsLayout>
<GridItemsLayout HorizontalItemSpacing="8" Orientation="Horizontal"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="x:String">
<Border Background="Blue" WidthRequest="200" StrokeShape="RoundRectangle, 12">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label
Grid.Row="1"
Text="{Binding}"
TextColor="White"
HorizontalOptions="Center"
VerticalOptions="Center"
FontSize="24"/>
</Grid>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ScrollView>
</ContentPage>