ClientsPage.xaml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. x:Class="practiceApplicaiton.ClientsPage"
  5. Title="Клиенты">
  6. <Grid RowDefinitions="Auto,*,Auto" Padding="16" RowSpacing="10">
  7. <Grid Grid.Row="0" ColumnDefinitions="*,Auto" ColumnSpacing="8">
  8. <Entry x:Name="SearchEntry" Placeholder="Поиск по фамилии или телефону"
  9. TextChanged="OnSearchChanged"/>
  10. <Button Grid.Column="1" Text="+ Добавить"
  11. BackgroundColor="#4472C4" TextColor="White" CornerRadius="8"
  12. Clicked="OnAddClicked"/>
  13. </Grid>
  14. <CollectionView Grid.Row="1" x:Name="ClientsList"
  15. SelectionMode="Single" SelectionChanged="OnSelectionChanged">
  16. <CollectionView.ItemTemplate>
  17. <DataTemplate>
  18. <Frame Margin="0,4" Padding="12" CornerRadius="8"
  19. BackgroundColor="White" BorderColor="#E0E0E0">
  20. <Grid ColumnDefinitions="*,Auto">
  21. <VerticalStackLayout Spacing="3">
  22. <Label Text="{Binding FullName}" TextColor="#4472C4"
  23. FontAttributes="Bold" FontSize="15"/>
  24. <Label Text="{Binding PhoneNumber}" TextColor="#555"/>
  25. <Label Text="{Binding FirmName}" TextColor="#888" FontSize="12"/>
  26. </VerticalStackLayout>
  27. </Grid>
  28. </Frame>
  29. </DataTemplate>
  30. </CollectionView.ItemTemplate>
  31. </CollectionView>
  32. <Grid Grid.Row="2" ColumnDefinitions="*,*" ColumnSpacing="8">
  33. <Button Text="Редактировать" BackgroundColor="#4472C4"
  34. TextColor="White" CornerRadius="8"
  35. x:Name="EditButton" IsEnabled="False" Clicked="OnEditClicked"/>
  36. <Button Grid.Column="1" Text="Удалить"
  37. BackgroundColor="#C0392B" TextColor="White" CornerRadius="8"
  38. x:Name="DeleteButton" IsEnabled="False" Clicked="OnDeleteClicked"/>
  39. </Grid>
  40. </Grid>
  41. </ContentPage>