Тайлбар байхгүй

ebakhtin c930e8c704 first 6 сар өмнө
.vs c930e8c704 first 6 сар өмнө
Model c930e8c704 first 6 сар өмнө
assets c930e8c704 first 6 сар өмнө
bin c930e8c704 first 6 сар өмнө
img c930e8c704 first 6 сар өмнө
obj c930e8c704 first 6 сар өмнө
App.xaml c930e8c704 first 6 сар өмнө
App.xaml.cs c930e8c704 first 6 сар өмнө
AssemblyInfo.cs c930e8c704 first 6 сар өмнө
MainWindow.xaml c930e8c704 first 6 сар өмнө
MainWindow.xaml.cs c930e8c704 first 6 сар өмнө
readme.md c930e8c704 first 6 сар өмнө
wpf_app.csproj c930e8c704 first 6 сар өмнө
wpf_app.csproj.user c930e8c704 first 6 сар өмнө
wpf_app.sln c930e8c704 first 6 сар өмнө

readme.md

Вывод данных согласно макета (ListBox, Image).

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>

...

Результат: