TableHotelPage.xaml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <Page x:Class="ПодготовкаКДемо1.Pages.TableHotelPage"
  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:ПодготовкаКДемо1.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="TableHotelPage">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="1*"/>
  13. <RowDefinition Height="3*"/>
  14. </Grid.RowDefinitions>
  15. <StackPanel Orientation="Horizontal">
  16. <Button x:Name="ButtonAdd" Width="100" Height="30" Content="Добавить отель" Style="{StaticResource Button}"/>
  17. <Button x:Name="ButtonDelete" Width="100" Height="30" Content="Удалить отели" Style="{StaticResource Button}" Click="ButtonDelete_Click"/>
  18. </StackPanel>
  19. <DataGrid x:Name="DataGridHotel" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" Grid.Row="2">
  20. <DataGrid.Columns>
  21. <DataGridTemplateColumn Header="">
  22. <DataGridTemplateColumn.CellTemplate>
  23. <DataTemplate>
  24. <Button x:Name="btnChange" Content="Редактировать" Uid="{Binding Id}" Click="btnChange_Click"/>
  25. </DataTemplate>
  26. </DataGridTemplateColumn.CellTemplate>
  27. </DataGridTemplateColumn>
  28. <DataGridTextColumn Header="Название отеля" Binding="{Binding Name}"/>
  29. <DataGridTextColumn Header="Количество звезд" Binding="{Binding CountOfStars}"/>
  30. <DataGridTextColumn Header="Название страны" Binding="{Binding CountryName}"/>
  31. <DataGridTextColumn Header="Кол-во туров" Binding="{Binding CountTour}"/>
  32. </DataGrid.Columns>
  33. </DataGrid>
  34. </Grid>
  35. </Page>