You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.7 KiB

1 year ago
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="NotesNet8.Views.AllNotesPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
1 year ago
xmlns:viewModels="clr-namespace:NotesNet8.ViewModels"
Title="AllNotesPage"
NavigatedTo="ContentPage_NavigatedTo">
<ContentPage.BindingContext>
<viewModels:NotesViewModel />
</ContentPage.BindingContext>
1 year ago
<ContentPage.ToolbarItems>
1 year ago
<ToolbarItem Command="{Binding NewCommand}"
1 year ago
IconImageSource="{FontImage Glyph='+',
Color=Black,
Size=22}"
Text="Add" />
</ContentPage.ToolbarItems>
<CollectionView x:Name="notesCollection"
Margin="20"
1 year ago
ItemsSource="{Binding AllNotes}"
SelectionMode="Single"
SelectionChangedCommand="{Binding SelectNoteCommand}"
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
1 year ago
<CollectionView.ItemsLayout>
<LinearItemsLayout ItemSpacing="10" Orientation="Vertical" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout>
<Label FontSize="22" Text="{Binding Text}" />
<Label FontSize="14"
Text="{Binding Date}"
TextColor="Silver" />
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</ContentPage>