NoteMAUI/NoteContent/EditorPage.xaml

61 lines
3.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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="NotesDataAnalyst.EditorPage"
Title="">
<!-- Верхняя панель инструментов -->
<ContentPage.ToolbarItems>
<ToolbarItem Text="Сохранить" IconImageSource="save_icon.png" Priority="0" Order="Primary" Clicked="SaveButton_Clicked"/>
</ContentPage.ToolbarItems>
<!-- Основное содержимое страницы -->
<ContentPage.Content>
<StackLayout Padding="10" Spacing="1">
<!-- Категория -->
<Label Text="Category" FontSize="18" TextColor="Gray"/>
<Picker x:Name="categoryPicker"
Title="Выберите категорию"
ItemsSource="{Binding Categories}" />
<Label Text="Заголовок" FontSize="18" TextColor="Gray"/>
<Entry x:Name="titleEditor" Placeholder="Введите заголовок" FontSize="16" />
<!-- Загрузка изображения -->
<!-- Дефолтное изображение -->
<Image x:Name="imageButton"
Source="dotnet_bot.png"
HeightRequest="100"
WidthRequest="100"
Aspect="AspectFill">
<Image.GestureRecognizers>
<TapGestureRecognizer Tapped="OnImageTapped" />
</Image.GestureRecognizers>
</Image>
<Editor x:Name="textEditor" Placeholder="Введите текст заметки" FontSize="16" HeightRequest="400" />
<!-- Нижняя панель с кнопками Markdown -->
<Grid BackgroundColor="Transparent" Padding="5" VerticalOptions="End" HorizontalOptions="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- Кнопки для редактирования Markdown -->
<ImageButton Source="delete.png" Grid.Column="0" Command="{Binding InsertHeaderCommand}" CommandParameter="**Bold Text**"/>
<ImageButton Source="delete.png" Grid.Column="1" Command="{Binding ShowLinkInputCommand}" CommandParameter="_Italic Text_"/>
<ImageButton Source="pencil.png" Grid.Column="2" Command="{Binding AddLinkCommand}"/>
<ImageButton Source="delete.png" Grid.Column="3" Command="{Binding InsertMarkdownCommand}" CommandParameter="# Header"/>
<ImageButton Source="delete.png" Grid.Column="4" Command="{Binding ShowEmojiPopupCommand}" CommandParameter="- List Item"/>
</Grid>
</StackLayout>
</ContentPage.Content>
</ContentPage>