扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:陶刚编译 来源:天极网 2007年11月4日
关键字:
<StackPanel> <TextBlock DockPanel.Dock="Left" FontSize="18" FontWeight="Bold" Margin="10" HorizontalAlignment="Left"> Titles </TextBlock> <ListBox HorizontalAlignment="Left" Margin="10,0,10,10" Width="300" Background="LightYellow" ItemsSource="{Binding Source={StaticResource RSSData}, XPath=item}" ItemTemplate="{StaticResource RSSTemplate}" SelectionChanged="TitleChanged" /> </StackPanel> |
<StackPanel> <TextBlock DockPanel.Dock="Left" FontSize="18" FontWeight="Bold" Margin="10" HorizontalAlignment="Left"> Description </TextBlock> <DockPanel HorizontalAlignment="Left" Name="dpDescription" Width="500"> <TextBlock Name="txtDescription" DockPanel.Dock="Top" FontSize="Small" HorizontalAlignment="Left" TextWrap="wrap" Margin="10,0,10,10" Background="Black" Foreground="White" TextContent="{Binding XPath=description}" /> </DockPanel> <DockPanel HorizontalAlignment="Left" Name="dpURL" Width="500" > <TextBlock Name="txtURL" DockPanel.Dock="Top" FontSize="Small" HorizontalAlignment="Left" TextWrap="wrap" TextContent="{Binding XPath=link}" Margin="10,10,10,10" Foreground="Blue"/> </DockPanel> </StackPanel> </DockPanel> </Page> |
图4:显示详细描述信息。被选中的RSS项的描述信息和 |
Partial Public Class Page1 Inherits Page Private Sub TitleChanged(ByVal sender As Object, _ ByVal args As SelectionChangedEventArgs) Dim lstbox As ListBox = sender If lstbox.SelectedItem IsNot Nothing Then dpDescription.DataContext = lstbox.SelectedItem dpURL.DataContext = lstbox.SelectedItem End If End Sub End Class |
<XmlDataSource x:Key="RSSData" Source="RSS.xml" XPath="/rss/channel" /> |
<XmlDataSource x:Key="RSSData" Source="http://services.devx.com/outgoing/devxfeed.xml" XPath="/rss/channel" /> |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者