我有一个产品列表,我希望它们有不同的图像,如何绑定图像,以便列表中的每个产品都有不同的图像?
<PivotItem Header="Lista">
<ListView x:Name="List1" ItemsSource="{x:Bind ProdutoViewModel.Produtos}">
<ListView.ItemTemplate>
<DataTemplate x:DataType="list:Produto">
<ListView>
<StackPanel>
<TextBlock Text="{x:Bind Nome, Mode=OneWay}" Margin="100,10,10,10"/>
<TextBlock Text="{x:Bind Preco, Mode=OneWay}" Margin="100,10,10,10"/>
<TextBlock Text="{x:Bind Disponivel, Mode=OneWay}" Margin="100,10,10,10"/>
<TextBlock Text="{x:Bind Fornecedor, Mode=OneWay}" Margin="100,10,10,10"/>
<TextBlock Text="{x:Bind Categoria, Mode=OneWay}" Margin="100,10,10,10"/>
<Image Source="Assets/mouse.png" Height="50" Width="80" Margin="10,-300,100,10"/>
<Image Source="Assets/teclado.png" Height="50" Width="80" Margin="10,-100,100,10"/>
</StackPanel>
</ListView>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>