-
Notifications
You must be signed in to change notification settings - Fork 0
/
HomePage.xaml
31 lines (29 loc) · 1.63 KB
/
HomePage.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
<?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:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="LearnPro.HomePage"
Title="Home">
<ScrollView>
<Grid Padding="10" ColumnSpacing="10" RowSpacing="10">
<CollectionView x:Name="CoursesCollectionView" ItemsSource="{Binding Courses}">
<CollectionView.ItemsLayout>
<GridItemsLayout Span="2" Orientation="Vertical" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Border Stroke="Gray" StrokeThickness="1" Padding="10" Margin="5">
<StackLayout Spacing="10">
<Image Source="{Binding Image}" HeightRequest="92" Aspect="AspectFill" />
<Label Text="{Binding Title}" FontSize="Medium" FontAttributes="Bold" />
<Label Text="{Binding Category}" FontSize="Small" TextColor="Gray" />
<Label Text="{Binding DatePublished}" FontSize="Small" TextColor="Gray" />
<Button Text="View" Clicked="OnViewCourseClicked" CommandParameter="{Binding Id}" />
</StackLayout>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ScrollView>
</ContentPage>