This question is locked. New answers and comments are not allowed.
Hi,
I have a list of items that I want to get in their own group. Essentially they each have their own header, and then it's content can be a few screens long, so using the JumpList with sticky headers enabled seemed to be the ideal solution.
The headers are not simple things, they are essentially a URL to an image, a name, and a date, so I am passing in the entire object to be the header.
What I have at the moment is - the header formats correctly, however everything seems to be grouped under the one item.
A bit of code that constructs the list
The MyViewModel has the following methods on it
I am completely at a loss now, as to what to do to get them to have their own headers. Am I missing something else? Thanks!
I have a list of items that I want to get in their own group. Essentially they each have their own header, and then it's content can be a few screens long, so using the JumpList with sticky headers enabled seemed to be the ideal solution.
The headers are not simple things, they are essentially a URL to an image, a name, and a date, so I am passing in the entire object to be the header.
What I have at the moment is - the header formats correctly, however everything seems to be grouped under the one item.
A bit of code that constructs the list
var listbox = new RadJumpList{ Margin = new Thickness(0, 0, -12, 0), ItemTemplate = Resources["templateFeed"] as DataTemplate, StickyHeaderTemplate = Resources["templateFeedHeader"] as DataTemplate, GroupHeaderTemplate = Resources["templateFeedHeader"] as DataTemplate, IsAsyncBalanceEnabled = false,};var selector = new GenericGroupDescriptor<MyViewModel, MyViewModel>(x => x); listbox.GroupDescriptors.Add(selector);listbox.IsGroupPickerEnabled = false;listbox.IsStickyHeaderEnabled = true;listbox.Tap += lst_Tap;listbox.ItemsSource = App.ViewModel.MyViewModel;The MyViewModel has the following methods on it
public int CompareTo(MyViewModel other){ return String.Compare(other.Id, Id, StringComparison.Ordinal);}public override bool Equals(object obj){ if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; if (obj.GetType() != this.GetType()) return false; return Equals((MyViewModel)obj);}protected bool Equals(MyViewModel other){ return string.Equals(UserImageUrl, other.UserImageUrl) && string.Equals(Id, other.Id);}