0
我想按屬性在ListView中排序項。但它不起作用。 我嘗試按屬性在ListView中排序項Windows Phone 8.1 RT
LView.OrderBy(p=>p.attribute);
List<Object> LVnew = LView.ItemsSource as List<Object>;
LVnew.Sort(Story.cmp_new);
public static int cmp_new(Story a, Story b)
{
return (Int16.Parse(a.storyID) > Int16.Parse(b.storyID)) ? 0 : 1;
}
幫我朋友