1234567891011121314151617181920212223242526272829303132333435 |
- <Page x:Class="ПодготовкаКДемо1.Pages.TableHotelPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:ПодготовкаКДемо1.Pages"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800"
- Title="TableHotelPage">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="1*"/>
- <RowDefinition Height="3*"/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal">
- <Button x:Name="ButtonAdd" Width="100" Height="30" Content="Добавить отель" Style="{StaticResource Button}"/>
- <Button x:Name="ButtonDelete" Width="100" Height="30" Content="Удалить отели" Style="{StaticResource Button}" Click="ButtonDelete_Click"/>
- </StackPanel>
- <DataGrid x:Name="DataGridHotel" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" IsReadOnly="True" Grid.Row="2">
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Button x:Name="btnChange" Content="Редактировать" Uid="{Binding Id}" Click="btnChange_Click"/>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn Header="Название отеля" Binding="{Binding Name}"/>
- <DataGridTextColumn Header="Количество звезд" Binding="{Binding CountOfStars}"/>
- <DataGridTextColumn Header="Название страны" Binding="{Binding CountryName}"/>
- <DataGridTextColumn Header="Кол-во туров" Binding="{Binding CountTour}"/>
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- </Page>
|