CatViewPage.xaml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <Page x:Class="CatProject.CatViewPage"
  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:CatProject"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800" MinHeight="800" MinWidth="600"
  9. Title="CatViewPage" FontSize="16">
  10. <Page.Resources>
  11. <BitmapImage x:Key="defaultImage" UriSource="/Resources/picture.png"></BitmapImage>
  12. </Page.Resources>
  13. <Grid>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="35"></RowDefinition>
  16. <RowDefinition Height="100"></RowDefinition>
  17. <RowDefinition></RowDefinition>
  18. <RowDefinition Height="35"></RowDefinition>
  19. </Grid.RowDefinitions>
  20. <Button Name="BtnAuto" Click="BtnAuto_Click">Авторизация</Button>
  21. <StackPanel Grid.Row="1">
  22. <TextBox Name="TBSearch" TextChanged="TBSearch_TextChanged"></TextBox>
  23. <ComboBox Name="CBFilterBreed" SelectionChanged="CBFilterBreed_SelectionChanged">
  24. </ComboBox>
  25. <CheckBox Name="CBOnly" Checked="CBOnly_Checked" Unchecked="CBOnly_Unchecked">Только мальчики</CheckBox>
  26. <StackPanel Orientation="Horizontal">
  27. <RadioButton Name="RBUp" Checked="RBUp_Checked">По имени по возрастанию</RadioButton>
  28. <RadioButton Name="RBDown" Checked="RBUp_Checked">По имени по убыванию</RadioButton>
  29. <RadioButton Name="RBNow" Checked="RBUp_Checked">Без сортировки</RadioButton>
  30. </StackPanel>
  31. </StackPanel>
  32. <ListView Grid.Row="2" Name="CatList" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  33. <ListView.ItemsPanel>
  34. <ItemsPanelTemplate>
  35. <WrapPanel HorizontalAlignment="Center"></WrapPanel>
  36. </ItemsPanelTemplate>
  37. </ListView.ItemsPanel>
  38. <ListView.ItemTemplate>
  39. <DataTemplate>
  40. <Border Padding="5" CornerRadius="5" BorderThickness="5" BorderBrush="#445c93">
  41. <Grid Width="350" Height="300" Background="{Binding GenderColor}">
  42. <StackPanel>
  43. <Image Source="{Binding Photo, TargetNullValue={StaticResource defaultImage}}" Width="200" Height="100"/>
  44. <TextBlock Text="{Binding CatAndColor}"></TextBlock>
  45. <TextBlock Text="{Binding Birthday, StringFormat={}dd.MM.yyyy}"></TextBlock>
  46. <TextBlock Text="{Binding BreedTable.Breed}"></TextBlock>
  47. <TextBlock Uid="{Binding idCat}" Loaded="TextBlock_Loaded" TextWrapping="Wrap"></TextBlock>
  48. <TextBlock Uid="{Binding idCat}" Loaded="TextBlock_Loaded_1"></TextBlock>
  49. <Button Uid="{Binding idCat}" Click="Button_Click">Редактировать</Button>
  50. <Button Uid="{Binding idCat}" Click="Button_Click_1">Удалить</Button>
  51. </StackPanel>
  52. </Grid>
  53. </Border>
  54. </DataTemplate>
  55. </ListView.ItemTemplate>
  56. </ListView>
  57. <Button Name="AddCat" Grid.Row="3" Click="AddCat_Click"> Добавить кота</Button>
  58. </Grid>
  59. </Page>