ebakhtin c930e8c704 first | 6 ay önce | |
---|---|---|
.vs | 6 ay önce | |
Model | 6 ay önce | |
assets | 6 ay önce | |
bin | 6 ay önce | |
img | 6 ay önce | |
obj | 6 ay önce | |
App.xaml | 6 ay önce | |
App.xaml.cs | 6 ay önce | |
AssemblyInfo.cs | 6 ay önce | |
MainWindow.xaml | 6 ay önce | |
MainWindow.xaml.cs | 6 ay önce | |
readme.md | 6 ay önce | |
wpf_app.csproj | 6 ay önce | |
wpf_app.csproj.user | 6 ay önce | |
wpf_app.sln | 6 ay önce |
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>
...