0
我有這樣的代碼:無法隱式轉換類型「System.Collections.Generic.IEnumerable GroupingLayer爲‘System.Collections.IList’
var selected = from c in myList group c by c.MainTitle into n select new GroupingLayer<string, MyObject>(n);
longListSelector.ItemsSource = selected; //Error here
public class GroupingLayer<TKey, TElement> : IGrouping<TKey, TElement>
{
private readonly IGrouping<TKey, TElement> grouping;
public GroupingLayer(IGrouping<TKey, TElement> unit)
{
grouping = unit;
}
public TKey Key
{
get { return grouping.Key; }
}
public IEnumerator<TElement> GetEnumerator()
{
return grouping.GetEnumerator();
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
{
return grouping.GetEnumerator();
}
}
什麼是它試圖告訴我,如何解決這個問題?
我正在使用Windows Phone 8應用程序。
你在嗎? – user2056563
請看看這裏http://stackoverflow.com/questions/21986760/binding-data-in-longlistselector – user2056563
你有看過嗎? – user2056563