PageHotel.xaml 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <Page x:Class="WpfAppHotel.PageHotel"
  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:WpfAppHotel"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="PageHotel"
  10. Style="{StaticResource pgStyle}">
  11. <Page.Resources>
  12. <BitmapImage x:Key="defaultImage" UriSource="/image/picture.png"/>
  13. </Page.Resources>
  14. <Grid>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="8*"/>
  17. <RowDefinition Height="1*"/>
  18. <RowDefinition Height="1*"/>
  19. </Grid.RowDefinitions>
  20. <ListView x:Name="ListHotel" Grid.Row="0" Height= "500" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalAlignment="Center">
  21. <ListView.ItemTemplate>
  22. <DataTemplate>
  23. <Border Width="400" Padding="10" CornerRadius="20" BorderThickness="1" BorderBrush="#445c93">
  24. <Grid>
  25. <StackPanel>
  26. <StackPanel>
  27. <TextBlock TextWrapping="Wrap" Text="{Binding AllInform}" Name="tbnameHotel"/>
  28. </StackPanel>
  29. <StackPanel>
  30. <Button Name="btnDelete" Uid="{Binding Id}" Content="Удалить" Template="{StaticResource btnStyleDelete}" Margin="0 0 0 10" Click="btnDelete_Click" />
  31. </StackPanel>
  32. </StackPanel>
  33. </Grid>
  34. </Border>
  35. </DataTemplate>
  36. </ListView.ItemTemplate>
  37. </ListView>
  38. <StackPanel Grid.Row="1">
  39. <StackPanel Orientation="Horizontal">
  40. <StackPanel HorizontalAlignment="Left" >
  41. <StackPanel Orientation="Horizontal" Margin="5,5,5,5">
  42. <TextBlock Text="Записей на странице" />
  43. <TextBox Name="tboxPageCount" Width="50" TextChanged="tboxPageCount_TextChanged"/>
  44. </StackPanel>
  45. </StackPanel>
  46. <StackPanel HorizontalAlignment="Right">
  47. <StackPanel Orientation="Horizontal" Margin="5,5,5,5">
  48. <TextBlock Name="tboxFirst" Uid="first" Text="&lt;&lt; " Margin="0 0 5 0" MouseDown="EditingCurrentPage_MouseDown"/>
  49. <TextBlock Name="tboxPrev" Uid="back" Text=" &lt; " Margin="0 0 5 0" MouseDown="EditingCurrentPage_MouseDown"/>
  50. <TextBlock Name="tboxPrev1" Uid="1" Text="{Binding Path = NPage[0]}" Visibility="{Binding Visible[0]}" Margin="0 0 5 0" Foreground="{Binding Gray[0]}" MouseDown="EditingCurrentPage_MouseDown"/>
  51. <TextBlock Name="tboxPrev2" Uid="2" Text="{Binding Path = NPage[1]}" Visibility="{Binding Visible[1]}" Margin="0 0 5 0" Foreground="{Binding Gray[1]}" MouseDown="EditingCurrentPage_MouseDown"/>
  52. <TextBlock Name="tboxPrev3" Uid="3" Text="{Binding Path = NPage[2]}" Visibility="{Binding Visible[2]}" Margin="0 0 5 0" Foreground="{Binding Gray[2]}" MouseDown="EditingCurrentPage_MouseDown"/>
  53. <TextBlock Name="tboxPrev4" Uid="4" Text="{Binding Path = NPage[3]}" Visibility="{Binding Visible[3]}" Margin="0 0 5 0" Foreground="{Binding Gray[3]}" MouseDown="EditingCurrentPage_MouseDown"/>
  54. <TextBlock Name="tboxPrev5" Uid="5" Text="{Binding Path = NPage[4]}" Visibility="{Binding Visible[4]}" Margin="0 0 5 0" Foreground="{Binding Gray[4]}" MouseDown="EditingCurrentPage_MouseDown"/>
  55. <TextBlock Name="tboxPrevNext" Uid="next" Text=" &gt; " MouseDown="EditingCurrentPage_MouseDown"/>
  56. <TextBlock Name="tboxPrevLast" Uid="last" Text=" &gt;&gt;" MouseDown="EditingCurrentPage_MouseDown"/>
  57. </StackPanel >
  58. </StackPanel>
  59. </StackPanel>
  60. </StackPanel>
  61. <StackPanel Grid.Row="3">
  62. <Grid>
  63. <Button x:Name="btnExit" HorizontalAlignment="Left" Template="{StaticResource btnStyle}" Content="Назад" Grid.ColumnSpan="2" Click="btnExit_Click"/>
  64. <Button x:Name="btnAdd" HorizontalAlignment="Right" Template="{StaticResource btnStyle}" Content="Добавить" Grid.Column="5" Margin="50,0,0,0" Click="btnAdd_Click" />
  65. </Grid>
  66. </StackPanel>
  67. </Grid>
  68. </Page>