| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?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="practiceApplicaiton.ClientsPage"
- Title="Клиенты">
- <Grid RowDefinitions="Auto,*,Auto" Padding="16" RowSpacing="10">
- <Grid Grid.Row="0" ColumnDefinitions="*,Auto" ColumnSpacing="8">
- <Entry x:Name="SearchEntry" Placeholder="Поиск по фамилии или телефону"
- TextChanged="OnSearchChanged"/>
- <Button Grid.Column="1" Text="+ Добавить"
- BackgroundColor="#4472C4" TextColor="White" CornerRadius="8"
- Clicked="OnAddClicked"/>
- </Grid>
- <CollectionView Grid.Row="1" x:Name="ClientsList"
- SelectionMode="Single" SelectionChanged="OnSelectionChanged">
- <CollectionView.ItemTemplate>
- <DataTemplate>
- <Frame Margin="0,4" Padding="12" CornerRadius="8"
- BackgroundColor="White" BorderColor="#E0E0E0">
- <Grid ColumnDefinitions="*,Auto">
- <VerticalStackLayout Spacing="3">
- <Label Text="{Binding FullName}" TextColor="#4472C4"
- FontAttributes="Bold" FontSize="15"/>
- <Label Text="{Binding PhoneNumber}" TextColor="#555"/>
- <Label Text="{Binding FirmName}" TextColor="#888" FontSize="12"/>
- </VerticalStackLayout>
- </Grid>
- </Frame>
- </DataTemplate>
- </CollectionView.ItemTemplate>
- </CollectionView>
- <Grid Grid.Row="2" ColumnDefinitions="*,*" ColumnSpacing="8">
- <Button Text="Редактировать" BackgroundColor="#4472C4"
- TextColor="White" CornerRadius="8"
- x:Name="EditButton" IsEnabled="False" Clicked="OnEditClicked"/>
- <Button Grid.Column="1" Text="Удалить"
- BackgroundColor="#C0392B" TextColor="White" CornerRadius="8"
- x:Name="DeleteButton" IsEnabled="False" Clicked="OnDeleteClicked"/>
- </Grid>
- </Grid>
- </ContentPage>
|