-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml
42 lines (41 loc) · 1.9 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
<?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"
x:Class="Notebook.MainPage">
<ScrollView>
<AbsoluteLayout>
<!-- Notes list -->
<CollectionView
x:Name="NotesCollectionView"
AbsoluteLayout.LayoutFlags="All"
AbsoluteLayout.LayoutBounds="0,0,1,1">
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame BackgroundColor="#0000ff" CornerRadius="10" Padding="10" Margin="5">
<Frame.GestureRecognizers>
<TapGestureRecognizer
Tapped="OnNoteTapped"
CommandParameter="{Binding .}"/>
</Frame.GestureRecognizers>
<StackLayout>
<Label
Style="{StaticResource SubHeadline}"
HorizontalOptions="Start" TextColor="#ffffff"
Text="{Binding Name}" />
<Label
TextColor="#00f0ff"
Text="{Binding ModificationDate}" />
</StackLayout>
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<!-- Button to add notes -->
<Button Text="+"
Clicked="OnAddItemClicked"
AbsoluteLayout.LayoutFlags="PositionProportional"
Margin="10"
AbsoluteLayout.LayoutBounds="1,1,-1,-1" />
</AbsoluteLayout>
</ScrollView>
</ContentPage>