我有一个ListBox,我想将它绑定到包含我的类型(SubscribeUnit)项的通用列表。
List<SubscribeUnit> Subscribes = new List<SubscribeUnit>();
,其中
class SubscribeUnit
{
public string Title { get; set; }
public string Link { get; set; }
public string Description { get; set; }
public Dictionary<FeedUnit, bool> Feeds = new Dictionary<FeedUnit, bool>();
}
class FeedUnit
{
public string Title { get; set; }
public string Link { get; set; }
public string PubDate { get; set; }
public string Descr { get; set; }
}
当我单击ListBoxItem(仅显示'Title'属性)时,ListBox应该更改内容。确切地说,它现在应该存储(只有'Title'属性)FeedUnit来自Dictionary<FeedUnit, bool> Feeds = new Dictionary<FeedUnit, bool>();
我该怎么做?任何帮助appriciated ...