-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathProjectListPage.xaml
More file actions
45 lines (42 loc) · 2.25 KB
/
ProjectListPage.xaml
File metadata and controls
45 lines (42 loc) · 2.25 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
<?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:pageModels="clr-namespace:DeveloperBalance.PageModels"
xmlns:models="clr-namespace:DeveloperBalance.Models"
xmlns:controls="clr-namespace:DeveloperBalance.Pages.Controls"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="DeveloperBalance.Pages.ProjectListPage"
x:DataType="pageModels:ProjectListPageModel"
x:Name="ListProjectsPage"
Title="Projects">
<ContentPage.Behaviors>
<toolkit:EventToCommandBehavior
BindingContext="{Binding Path=BindingContext, Source={x:Reference ListProjectsPage}, x:DataType=ContentPage}"
EventName="Appearing"
Command="{Binding AppearingCommand}" />
</ContentPage.Behaviors>
<Grid>
<ScrollView>
<VerticalStackLayout
BindableLayout.ItemsSource="{Binding Projects}"
Margin="{StaticResource LayoutPadding}"
Spacing="{StaticResource LayoutSpacing}">
<BindableLayout.ItemTemplate>
<DataTemplate x:DataType="models:Project">
<Border SemanticProperties.Description="{Binding Name, StringFormat='{0} Project'}">
<VerticalStackLayout Padding="10">
<Label Text="{Binding Name}" FontSize="24" />
<Label Text="{Binding Description}" />
</VerticalStackLayout>
<Border.GestureRecognizers>
<TapGestureRecognizer Command="{Binding NavigateToProjectCommand, Source={RelativeSource AncestorType={x:Type pageModels:ProjectListPageModel}}, x:DataType=pageModels:ProjectListPageModel}" CommandParameter="{Binding .}"/>
</Border.GestureRecognizers>
</Border>
</DataTemplate>
</BindableLayout.ItemTemplate>
</VerticalStackLayout>
</ScrollView>
<controls:AddButton
Command="{Binding AddProjectCommand}" />
</Grid>
</ContentPage>