【发布时间】:2012-04-25 21:43:21
【问题描述】:
如何通过绑定列出类的所有属性名称
<ListBox>
<TextBlock Name="{Binding WHAAAAT???!}" />
</ListBox>
类:
public class DaysOfWeek
{
public bool Monday {get; set;}
public bool Tuesday { get; set; }
public bool Wednesday { get; set; }
public bool Thursday { get; set; }
public bool Friday { get; set; }
public bool Saturday { get; set; }
public bool Sunday { get; set; }
}
我想将此内容放在列表框中。 请帮帮我。
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
感激不尽。
【问题讨论】:
-
你的 DaysOfWeek 应该是一个枚举,然后你应该在另一个类中有一个 DaysOfWeek 类型的 CurrentDay 属性
标签: c# silverlight windows-phone-7 xaml