How best to display a catalog in wpf?

Viewed 35

I need to implement the output of the product catalog. The template is simple, the image and the name are at the bottom. The images will go in a row and move down depending on the screen. Previously, I created an Itemscontrol, the itemssource of which took data from the database.

I know that the option works with its own difficulties, but is it optimal or is there another way?

            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <StackPanel Margin="200">
                        <Image Source="{Binding Image}" Height="250"/>
                        <TextBlock Text="{Binding Name}" HorizontalAlignment="Center"/>
                    </StackPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
0 Answers
Related