123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <Window x:Class="wpf_template.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:wpf_template"
- mc:Ignorable="d"
- Title="MainWindow" Height="450" Width="800">
-
- <Grid ShowGridLines="True">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition />
- <RowDefinition Height="auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Image
- Source="assets/nagievlogo2.jpg"
- Grid.Row="1"
- Grid.RowSpan="2"/>
- <StackPanel
- Orientation="Vertical"
- Grid.RowSpan="3"
- Grid.Row="2"
- VerticalAlignment="Bottom">
- <Button
- x:Name="ExitButton"
- Content="Выход"
- Click="ExitButton_Click"
- Height="50"/>
- </StackPanel>
- <DataGrid
- Grid.Row="1"
- Grid.Column="1"
- CanUserAddRows="False"
- AutoGenerateColumns="False"
- ItemsSource="{Binding ProductList}">
- <DataGrid.Columns>
- <DataGridTextColumn
- Header="Категория"
- Binding="{Binding Category}"/>
- <DataGridTextColumn
- Header="Компания"
- Binding="{Binding Company}"/>
- <DataGridTextColumn
- Header="Название"
- Binding="{Binding Title}"/>
- <DataGridTextColumn
- Header="Цена"
- Binding="{Binding Price}"/>
- </DataGrid.Columns>
- </DataGrid>
- <WrapPanel
- Orientation="Horizontal"
- Grid.Column="1"
- MinHeight="50
- ">
- <!-- минимальную высоту я тут поставил, чтобы верхнюю строку сетки было видно. В реальном приложении она не нужна -->
- </WrapPanel>
- </Grid>
- </Window>
|