NoteMAUI/NoteContent/NoteSelectionPopup.xaml

31 lines
1.5 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="NotesDataAnalyst.NoteSelectionPopup">
<StackLayout Padding="20" BackgroundColor="White" WidthRequest="300">
<Label Text="Выберите заметку для ссылки" FontSize="18" FontAttributes="Bold" HorizontalOptions="Center" />
<SearchBar x:Name="searchBar" Placeholder="Поиск заметок" TextChanged="OnSearchTextChanged" />
<CollectionView x:Name="notesCollectionView" SelectionMode="Single" SelectionChanged="OnNoteSelected">
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame Padding="10" Margin="5" BackgroundColor="LightGray" CornerRadius="8">
<Frame.GestureRecognizers>
<TapGestureRecognizer Tapped="OnNoteTapped" />
</Frame.GestureRecognizers>
<Label Text="{Binding Title}" FontSize="16" TextColor="Black" />
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
<Button Text="Отмена" Clicked="OnCancelButtonClicked" BackgroundColor="#f44336" TextColor="White"/>
</StackLayout>
</toolkit:Popup>