Skip to content

Commit 66576b1

Browse files
committed
More changes
1 parent 14b6ea8 commit 66576b1

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

10.0/Apps/DeveloperBalance/Pages/ProjectListPage.xaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,36 @@
99
x:DataType="pageModels:ProjectListPageModel"
1010
Title="Projects">
1111

12-
1312
<ContentPage.Behaviors>
1413
<toolkit:EventToCommandBehavior
14+
x:Name="AppearingBehavior"
1515
EventName="Appearing"
1616
Command="{Binding AppearingCommand}" />
1717
</ContentPage.Behaviors>
1818
<Grid>
19-
<ScrollView>
20-
<VerticalStackLayout
21-
BindableLayout.ItemsSource="{Binding Projects}"
22-
Margin="{StaticResource LayoutPadding}"
23-
Spacing="{StaticResource LayoutSpacing}">
24-
<BindableLayout.ItemTemplate>
19+
<CollectionView ItemsSource="{Binding Projects}"
20+
Margin="{StaticResource LayoutPadding}"
21+
x:Name="ProjectsCollectionView"
22+
SelectionMode="Single"
23+
SelectedItem="{Binding SelectedProject}"
24+
SelectionChangedCommand="{Binding NavigateToProjectCommand, Source={RelativeSource AncestorType={x:Type pageModels:ProjectListPageModel}}, x:DataType=pageModels:ProjectListPageModel}"
25+
SelectionChangedCommandParameter="{Binding SelectedProject}">
26+
<CollectionView.ItemsLayout>
27+
<LinearItemsLayout Orientation="Vertical" ItemSpacing="7.5"/>
28+
</CollectionView.ItemsLayout>
29+
<CollectionView.ItemTemplate>
2530
<DataTemplate x:DataType="models:Project">
26-
<Border SemanticProperties.Description="{Binding Name, StringFormat='{0} Project'}">
31+
<Border SemanticProperties.Description="{Binding Name, StringFormat='{0}'}">
2732
<VerticalStackLayout Padding="10">
2833
<Label Text="{Binding Name}" FontSize="24" />
2934
<Label Text="{Binding Description}" />
3035
</VerticalStackLayout>
31-
<Border.GestureRecognizers>
32-
<TapGestureRecognizer Command="{Binding NavigateToProjectCommand, Source={RelativeSource AncestorType={x:Type pageModels:ProjectListPageModel}}, x:DataType=pageModels:ProjectListPageModel}" CommandParameter="{Binding .}"/>
33-
</Border.GestureRecognizers>
3436
</Border>
3537
</DataTemplate>
36-
</BindableLayout.ItemTemplate>
37-
</VerticalStackLayout>
38-
</ScrollView>
38+
</CollectionView.ItemTemplate>
39+
</CollectionView>
3940

40-
<controls:AddButton
41-
Command="{Binding AddProjectCommand}" />
41+
<controls:AddButton
42+
Command="{Binding AddProjectCommand}" />
4243
</Grid>
4344
</ContentPage>

10.0/Apps/DeveloperBalance/Pages/ProjectListPage.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ public ProjectListPage(ProjectListPageModel model)
66
{
77
BindingContext = model;
88
InitializeComponent();
9-
}
9+
AppearingBehavior.BindingContext = model;
10+
}
1011
}

10.0/Apps/DeveloperBalance/Platforms/MacCatalyst/Info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<array>
1616
<integer>2</integer>
1717
</array>
18+
<key>LSApplicationCategoryType</key>
19+
<string>public.app-category.lifestyle</string>
1820
<key>UIRequiredDeviceCapabilities</key>
1921
<array>
2022
<string>arm64</string>

0 commit comments

Comments
 (0)