【发布时间】:2013-12-12 06:07:34
【问题描述】:
list.ItemsSource=db.Templates.GroupBy(t=>t.CategoryName);
在xml中:
<DataTemplate>
<TextBlock Text="{Binding Key}" />
</DataTemplate>
在这段代码之后。不要在 TextBlock 中显示任何文本。我正在像这样更改文本绑定
<DataTemplate>
<TextBlock Text="{Binding}" />
</DataTemplate>
TextBlock 文本显示如下System.Linq.Lookup^2+Grouping[System.String,Model.Template]
我正在调试和检查Key 属性。这不是空的。
为什么Key 不在TextBlock 中绑定?
如何在文本块中显示组标题?
【问题讨论】:
标签: c# silverlight linq windows-phone-7.1