开发者

How to change the content of ListBox when clicked on ListBoxItem?

I have a ListBox and I whant to bind it to a generic list with items of my type (SubscribeUnit).

List<SubscribeUnit> Subscribes = new List<SubscribeUnit>();

开发者_Go百科where

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; }
}

When I click on ListBoxItem (that displays only the 'Title' property), the ListBox should change the content. To be exact it should now store (only the 'Title' property) FeedUnit's from Dictionary<FeedUnit, bool> Feeds = new Dictionary<FeedUnit, bool>();

How can I do that? Any help appriciated...


Create a data template which changes itself when the ListBoxItem.IsSelected property becomes true using a trigger.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜