PageList.xaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <Page x:Class="WpfAppProject.pages.PageList"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:WpfAppProject.pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="PageList">
  10. <Page.Resources>
  11. <BitmapImage x:Key="NoPhoto" UriSource="/images/picture.png"/>
  12. </Page.Resources>
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition/>
  16. <RowDefinition Height="2*"/>
  17. <RowDefinition Height="70"/>
  18. </Grid.RowDefinitions>
  19. <Grid Grid.Row="0">
  20. </Grid>
  21. <ListView Name="lvUsers" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  22. <ListView.ItemTemplate>
  23. <DataTemplate>
  24. <Border BorderThickness="2" BorderBrush="Black" CornerRadius="2" Padding="5">
  25. <Grid>
  26. <StackPanel>
  27. <Image Width="200" Source="{Binding Photo, TargetNullValue={StaticResource NoPhoto}}"/>
  28. <TextBlock Text="{Binding FIO}"/>
  29. <TextBlock Text="{Binding UserBirthday}"/>
  30. <TextBlock Text="{Binding UserPhone}"/>
  31. <Button Name="BtnUpdate" Uid="{Binding UserId}" Content="Update" Loaded="BtnUpdate_Loaded" Click="BtnUpdate_Click"/>
  32. <Button Name="BtnDelete" Uid="{Binding UserId}" Content="Delete" Loaded="BtnDelete_Loaded" Click="BtnDelete_Click"/>
  33. </StackPanel>
  34. </Grid>
  35. </Border>
  36. </DataTemplate>
  37. </ListView.ItemTemplate>
  38. </ListView>
  39. </Grid>
  40. </Page>