123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <Window x:Class="wpf_connection3.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_connection3"
- mc:Ignorable="d"
- Background="PeachPuff"
- Title="MainWindow" Height="450" Width="800">
- <Grid ShowGridLines="True">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition />
- <RowDefinition Height="50"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <ListBox
- Name="ProductListBox"
- SelectionMode="Multiple"
- SelectionChanged="ProductListBox_OnSelectionChanged"
- Grid.Row="1"
- Grid.Column="1"
- Background="White"
- MouseDoubleClick="ProductListBox_MouseDoubleClick"
- ItemsSource="{Binding productList}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled" Margin="3,3,0,0" RenderTransformOrigin="0.5,0.5">
- <ListBox.ItemContainerStyle>
- <Style
- TargetType="ListBoxItem">
- <Setter
- Property="HorizontalContentAlignment"
- Value="Stretch" />
- </Style>
- </ListBox.ItemContainerStyle>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border
- BorderThickness="1"
- BorderBrush="Black"
- Background="{Binding BackgroundColor}"
- CornerRadius="5">
- <Grid
- Margin="10"
- HorizontalAlignment="Stretch">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="64"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="auto"/>
- </Grid.ColumnDefinitions>
- <Image
- Width="64"
- Height="64"
- Source="{Binding ImageBitmap}" HorizontalAlignment="Center"/>
- <StackPanel
- Grid.Column="1"
- Margin="5"
- Orientation="Vertical">
- <TextBlock
- Text="{Binding Title}"/>
- <TextBlock
- Text="{Binding ArticleNumber}"/>
- </StackPanel>
- <TextBlock
- Grid.Column="2"
- Text="{Binding ProductTypeID}"/>
- </Grid>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- <WrapPanel
- Grid.Column="1"
- Orientation="Horizontal"
- Background="MediumPurple"
- ItemHeight="50">
-
- <ComboBox
- Width="164"
-
- x:Name="ProductTypeFilter"
- SelectedIndex="0"
- SelectionChanged="ProductTypeFilter_SelectionChanged"
- ItemsSource="{Binding productTypeList}" Margin="0,15,0,15"/>
- <ComboBox
- Name="SortTypeComboBox"
- SelectedIndex="0"
- VerticalContentAlignment="Center"
- MinWidth="200"
- SelectionChanged="SortTypeComboBox_SelectionChanged"
- Height="20"
- ItemsSource="{Binding sortList}"/>
- <TextBox
- Width="200"
- VerticalAlignment="Center"
- x:Name="searchFilterTextBox"
- Background="Cyan"
- Height="30"
- KeyUp="searchFilterTextBox_KeyUp"/>
- <Button
- Name="AddProductButton"
- Content="Добавить продукт"
- Margin="5"
- Click="AddProductButton_Click"/>
-
-
- </WrapPanel>
- <ListBox
- x:Name="PageListListBox"
- ItemsSource="{Binding pageList}"
- Grid.Column="1"
- Background="Aqua"
- Grid.Row="2">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel
- HorizontalAlignment="Left" />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock
- Margin="5"
- Text="{Binding}"
- PreviewMouseDown="TextBlock_PreviewMouseDown"/>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
-
- <Button
- x:Name="CostChangeButton"
- Visibility="{Binding costChangeButtonVisible}" Content="Изменить стоимость на:"
- Click="CostChangeButton_Click"
- Background="MediumPurple"
- />
- <Image
-
- Grid.RowSpan="5"
-
- Source="foto/1.jpg"
-
-
- />
- <StackPanel
-
- Grid.Row="3"
- Orientation="Vertical"
-
- VerticalAlignment="Bottom">
- <Button
- x:Name="ExitButton"
- Content="Выход"
- Click="ExitButton_Click"
- Background="MediumPurple"
- Height="auto"/>
- </StackPanel>
-
- <WrapPanel
-
- Orientation="Horizontal"
- Grid.Column="1"
- MinHeight="50">
- </WrapPanel>
-
- </Grid>
- </Window>
|