78 lines
3.2 KiB
XML
78 lines
3.2 KiB
XML
<?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="Phonebook.ContactDetailPage"
|
||
Title="Контакт" Shell.TitleColor="{DynamicResource Primary}"
|
||
BackgroundColor="{DynamicResource PageBackgroundColor}">
|
||
|
||
<ScrollView>
|
||
<StackLayout Padding="20" Spacing="15">
|
||
<!-- Photo -->
|
||
<Grid HorizontalOptions="Center" VerticalOptions="Center">
|
||
<!-- Круглая маска -->
|
||
<Ellipse WidthRequest="150"
|
||
HeightRequest="150"
|
||
Fill="LightGray"
|
||
HorizontalOptions="Center"
|
||
VerticalOptions="Center"/>
|
||
|
||
<!-- Изображение с круглым клипом -->
|
||
<Image x:Name="contactImage"
|
||
WidthRequest="150"
|
||
HeightRequest="150"
|
||
Aspect="AspectFill">
|
||
<Image.Clip>
|
||
<EllipseGeometry Center="75,75"
|
||
RadiusX="75"
|
||
RadiusY="75"/>
|
||
</Image.Clip>
|
||
<Image.GestureRecognizers>
|
||
<TapGestureRecognizer Tapped="OnImageTapped"/>
|
||
</Image.GestureRecognizers>
|
||
</Image>
|
||
|
||
<!-- Иконка камеры для наглядности -->
|
||
<Image Source="camera_icon.png"
|
||
WidthRequest="40"
|
||
HeightRequest="40"
|
||
HorizontalOptions="End"
|
||
VerticalOptions="End"
|
||
Margin="0,0,10,10"/>
|
||
</Grid>
|
||
|
||
<Button Text="Выбрать фото" Clicked="OnImageTapped" HorizontalOptions="Center" BackgroundColor="{DynamicResource Primary}"/>
|
||
|
||
<!-- Name -->
|
||
<Label Text="Имя"/>
|
||
<Entry x:Name="nameEntry" Placeholder="Введите имя"/>
|
||
|
||
<!-- Phone -->
|
||
<Label Text="Номер телефона"/>
|
||
<Entry x:Name="phoneEntry" Placeholder="Введите номер" Keyboard="Telephone"/>
|
||
|
||
<Label Text="Email"/>
|
||
<Entry x:Name="emailEntry"
|
||
Placeholder="Введите email"
|
||
Keyboard="Email"/>
|
||
|
||
<!-- Address -->
|
||
<Label Text="Адрес"/>
|
||
<Editor x:Name="addressEntry"
|
||
Placeholder="Введите адрес"
|
||
AutoSize="TextChanges"/>
|
||
|
||
<!-- Description -->
|
||
<Label Text="Описание"/>
|
||
<Editor x:Name="descriptionEntry" Placeholder="Введите описание" AutoSize="TextChanges"/>
|
||
|
||
<!-- Buttons -->
|
||
<Grid ColumnDefinitions="*,*" ColumnSpacing="10">
|
||
<Button Text="Сохранить" Clicked="OnSaveClicked" Grid.Column="0"
|
||
BackgroundColor="{DynamicResource Primary}"/>
|
||
<Button Text="Удалить" Clicked="OnDeleteClicked" Grid.Column="1"
|
||
IsVisible="{Binding Id, Converter={StaticResource NullToBoolConverter}}"
|
||
BackgroundColor="{DynamicResource Error}"/>
|
||
</Grid>
|
||
</StackLayout>
|
||
</ScrollView>
|
||
</ContentPage> |