ebakhtin c930e8c704 first | 6 сар өмнө | |
---|---|---|
.vs | 6 сар өмнө | |
Model | 6 сар өмнө | |
assets | 6 сар өмнө | |
bin | 6 сар өмнө | |
img | 6 сар өмнө | |
obj | 6 сар өмнө | |
App.xaml | 6 сар өмнө | |
App.xaml.cs | 6 сар өмнө | |
AssemblyInfo.cs | 6 сар өмнө | |
MainWindow.xaml | 6 сар өмнө | |
MainWindow.xaml.cs | 6 сар өмнө | |
readme.md | 6 сар өмнө | |
wpf_app.csproj | 6 сар өмнө | |
wpf_app.csproj.user | 6 сар өмнө | |
wpf_app.sln | 6 сар өмнө |
XAML:
...
<ListBox
Grid.Row="1"
Grid.Column="1"
Background="White"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ItemsSource="{Binding ProductList}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel
HorizontalAlignment="Center"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border
BorderThickness="1"
BorderBrush="Black"
CornerRadius="5">
<Grid
Margin="10"
Width="300"
HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="64"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image
Width="64"
Height="64"
Source="{Binding ImageBitmap,TargetNullValue={StaticResource defaultImage}}"/>
<StackPanel
Grid.Column="1"
Margin="5"
Orientation="Vertical"
VerticalAlignment="Center">
<TextBlock
Text="{Binding Company}"/>
<TextBlock
Text="{Binding Title}"/>
</StackPanel>
<WrapPanel
Grid.Column="2"
VerticalAlignment="Center"
HorizontalAlignment="Right">
<Label
Content="Цена:"/>
<TextBlock
Grid.Column="2"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Text="{Binding Price}"/>
</WrapPanel>
</Grid>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
...