< Grid xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml"
>
< Grid.Resources >
< XmlDataProvider x:Key ="rss"
Source ="http://informer.gismeteo.ua/rss/99882.xml"
XPath ="/rss/channel" />
< DataTemplate DataType ="item" >
< StackPanel >
< TextBlock Text ="{Binding XPath=title}" />
< TextBlock TextWrapping ="Wrap" Width ="360" Text ="{Binding XPath=description}" />
< Image Margin ="15,15,0,0"
Stretch ="None"
HorizontalAlignment ="Left"
Source ="{Binding XPath=enclosure/@url}" />
</ StackPanel >
</ DataTemplate >
</ Grid.Resources >
< Border BorderBrush ="Black"
BorderThickness ="1" Width ="360" Height ="200" CornerRadius ="6" >
< ListBox ScrollViewer . HorizontalScrollBarVisibility ="Hidden"
ItemsSource ="{Binding Source={StaticResource rss}, XPath=item}" />
</ Border >
</ Grid >
* This source code was highlighted with Source Code Highlighter .
< XmlDataProvider x:Key ="rss"
Source ="http://informer.gismeteo.ua/rss/99882.xml"
XPath ="/rss/channel" />
* This source code was highlighted with Source Code Highlighter .
< ListBox ScrollViewer . HorizontalScrollBarVisibility ="Hidden"
ItemsSource ="{Binding Source={StaticResource rss}, XPath=item}" />
* This source code was highlighted with Source Code Highlighter .
< DataTemplate DataType ="item" >
< StackPanel >
< TextBlock Text ="{Binding XPath=title}" />
< TextBlock TextWrapping ="Wrap" Width ="360" Text ="{Binding XPath=description}" />
< Image Margin ="15,15,0,0"
Stretch ="None"
HorizontalAlignment ="Left"
Source ="{Binding XPath=enclosure/@url}" />
</ StackPanel >
</ DataTemplate >
* This source code was highlighted with Source Code Highlighter .
Source: https://habr.com/ru/post/86715/