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
41 lines
1.7 KiB
<?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"
|
|
xmlns:viewModels="clr-namespace:NotesNet8.ViewModels"
|
|
Title="AllNotesPage"
|
|
NavigatedTo="ContentPage_NavigatedTo">
|
|
<ContentPage.BindingContext>
|
|
<viewModels:NotesViewModel />
|
|
</ContentPage.BindingContext>
|
|
|
|
<ContentPage.ToolbarItems>
|
|
<ToolbarItem Command="{Binding NewCommand}"
|
|
IconImageSource="{FontImage Glyph='+',
|
|
Color=Black,
|
|
Size=22}"
|
|
Text="Add" />
|
|
</ContentPage.ToolbarItems>
|
|
|
|
<CollectionView x:Name="notesCollection"
|
|
Margin="20"
|
|
ItemsSource="{Binding AllNotes}"
|
|
SelectionMode="Single"
|
|
SelectionChangedCommand="{Binding SelectNoteCommand}"
|
|
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
|
|
<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> |