1: <Window x:Class="RssReader.Window1"
2: xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3: xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4: Title="RssReader" Height="600" Width="800">
5:
6: <Window.Resources>
7: <XmlDataProvider x:Key="rssdata"
8: Source="http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml"
9: XPath="rss/channel/item"/>
10:
11: </Window.Resources>
12:
13: <DockPanel DataContext="{Binding Source={StaticResource rssdata}}">
14: <StackPanel DockPanel.Dock="Top"
15: TextElement.FontWeight="Bold" Background="Gray">
16:
17: <TextBlock Text="{Binding XPath=./../title}"
18: FontSize="20" Margin="10 10 10 0"/>
19:
20: <TextBlock Text="{Binding XPath=./../description}"
21: FontSize="10" FontWeight="Normal" Margin="10 0"/>
22:
23: <TextBox Margin="5" Text="{Binding Source={StaticResource rssdata},
24: BindsDirectlyToSource=True,
25: Path=Source,
26: UpdateSourceTrigger=PropertyChanged}"/>
27: </StackPanel>
28:
29: <StatusBar DockPanel.Dock="Bottom">
30: <StatusBarItem Content="{Binding XPath=title}"/>
31: <Separator/>
32: <StatusBarItem Content="{Binding XPath=pubDate}"/>
33: </StatusBar>
34:
35: <Grid>
36: <Grid.ColumnDefinitions>
37: <ColumnDefinition Width="25*"/>
38: <ColumnDefinition Width="75*"/>
39: <ColumnDefinition/>
40: </Grid.ColumnDefinitions>
41:
42: <ListBox Grid.Column="0" IsSynchronizedWithCurrentItem="True"
43: ItemsSource="{Binding}" DisplayMemberPath="title"
44: Style="{StaticResource ListBoxHand}"/>
45: <GridSplitter/>
46:
47: <Grid Grid.Column="1">
48: <Grid.RowDefinitions>
49: <RowDefinition Height="Auto"> </RowDefinition>
50: <RowDefinition Height="85*"> </RowDefinition>
51: </Grid.RowDefinitions>
52:
53: <ListBox x:Name="selection" Grid.Row="0" IsSynchronizedWithCurrentItem="True"
54: Style="{StaticResource SimpleListBox}"
55: VerticalAlignment="Stretch"
56: GotFocus="selection_GotFocus">
57:
58: <StackPanel>
59: <TextBlock Text="{Binding XPath=description}" />
60: <TextBlock x:Name="txtlink" Text="{Binding XPath=link}"/>
61: </StackPanel>
62: </ListBox>
63: <Frame x:Name="Explorer" Grid.Row="1"/>
64: </Grid>
65: </Grid>
66:
67: </DockPanel>
68: </Window>
69: