修改RSS阅读器源是动态的 [英] Modify RSS Reader Source to be dynamic

查看:94
本文介绍了修改RSS阅读器源是动态的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试修改生成的RSS阅读器应用程序的来源,以便读者可以从用户输入的自定义网址中提取。 但是,我很难这样做,因为看起来读卡器模块本身就非常独立。所以
我有点被困在那里。

I'm attempting to modify the source of a generated RSS reader app so that the reader can pull from a custom url that the user inputs.  However, I'm having trouble doing so, since it seems the reader module itself is extremely self contained. So I've kinda been stuck from there.

任何人都有想法? 

Anyone have ideas? 

推荐答案

您好,

要添加您想要的功能,请按以下步骤操作:

To add the feature you want, please follow these steps:

在视图中:

   •使用文本框向主网格添加一行,以插入RSS源的URL。

   •文本框的Text属性必须绑定到ViewModel的URL属性。这是一个新属性,因此您必须创建它。

   • Add a row to the main Grid with a textbox to insert the URL of the RSS feed.
   • The Text Property of the textbox must be binded to the URL Property of ViewModel. It’s a new property, so you must create it.

在ViewModel中:

In the ViewModel:

   • 添加URL属性,然后将视图中插入的值分配给集合中存储库的RssUrl属性。

   • 当仍在集合中时,刷新以在更改数据集后更新数据

   • Add the URL Property and then assign the value inserted in the view to the repository’s RssUrl property in the set.
   • While still in the set, refresh to update the data after changing the dataset

在存储库中:

   • 将RssUrl属性从私有const字符串更改为公共属性,并使用get和set

   • 在属性集中,使用您拥有的存储服务将用户插入的URL保存到磁盘。

   • 在构造函数中,添加条件: 如果有一个URL保存到磁盘然后加载,否则什么都不做。这将删除应用程序可能具有的以前RSS源的数据缓存。

   • Change the RssUrl property from a private const string to a public property with get and set
   • In the Property set, save the URL inserted by the user to disk using the storage service you have.
   • In the constructor, add the condition:  if there is a URL saved to disk then load, else do nothing. This will delete the data caching that the app could have from the previous RSS feed.

感谢您使用Windows Phone App Studio。

Thank for using Windows Phone App Studio.


这篇关于修改RSS阅读器源是动态的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆