<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="RSS Reader">
<Window.Resources>
<XmlDataProvider x:Key="Blog" Source="http://blogs.msdn.com/adam_nathan/rss.aspx"/>
</Window.Resources>
<DockPanel
DataContext="{Binding Source={StaticResource Blog}, XPath=/rss/channel/item}">
<TextBox DockPanel.Dock="Top" Text="{Binding Source={StaticResource Blog},BindsDirectlyToSource=true, Path=Source,UpdateSourceTrigger=PropertyChanged}"/>
<Label DockPanel.Dock="Top" Content="{Binding XPath=/rss/channel/title}" FontSize="14" FontWeight="Bold"/>
<Label DockPanel.Dock="Top" Content="{Binding XPath=/rss/channel/description}"/>
<ListBox DockPanel.Dock="Left" DisplayMemberPath="title" ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True" Width="300"/>
<Frame Source="{Binding XPath=link}"/>
</DockPanel>
</Window>
|