I'm trying to explore what is the best way to bind and sorted dictionary collection to xamdatatree.
My goal is to index student names by alphabets for each school.
My data tree should look like -
School Name1
- A
- Ash
- Asta
- Arod
- Azura
- B
- Bobby
- Bpranden
- Bxosch
School Name2
- Astro
- Atrak
- K
- Krak
- Ktul
My class is :
public class School
{
public string Name { get; set; }
public SortedDictionary<char, string> StudentNameByIndex { get; set}
}
Thank you very much.
The XamDataTree is going to walk the ItemSource as an IEnumerable and if the data object has an IEnumerable member, attempt to walk that. So your datasource would need to reflect data in that manner.
So for this kind of set up you would need a data object
class Letter {
string Letter {get;set}
IEnumerable KidsWithThatLetter{get;set}
The IEnumeable would be the list of students that would fall under that letter.
Any ideas will be hugely appreciated
Please help
Any thoughts on this please.