I want to add article's image to listview from rss feed in windows 10
I try this article to add rss feed : https://code.msdn.microsoft.com/windowsapps/How-to-perform-RSS-Reader-4803093b
But I can't add article's image in listview
For adding image to you listview items you need to define the Listview DataTemplate to something like this :
<ListView x:Name="MyList">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Source={Binding img} Height="100"/>
<TextBlock Text="{Binding text}"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
Then you can provide the image source and text to each item by creating a list of items from your RSS Feed and then assigning your ListView
item source to this list.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.