I just got some data like this
[
{
"ID":2,
"NOTAMRec":"C16-0001",
"DeliverDate":"310827",
"BeginDate":"1601010130",
"ExpireDate":"1606070630",
"Priority":"GG",
"ItemA":"LOL",
"OriginalNotamID":2,
"SelectedNotamColor":null
},
{
"ID":8,
"NOTAMRec":"C16-0004",
"DeliverDate":"230705",
"BeginDate":"1602231505",
"ExpireDate":"1606312359 EST",
"Priority":"GG",
"ItemA":"LOVEU",
"OriginalNotamID":8,
"SelectedNotamColor":null
},
{
"ID":9,
"NOTAMRec":"C16-0005",
"DeliverDate":"240703",
"BeginDate":"1602241502",
"ExpireDate":"1606312359 EST",
"Priority":"GG",
"ItemA":"LOVEU",
"OriginalNotamID":9,
"SelectedNotamColor":null
}
]
and I cast this into a Model
Public Class MyModel
{
Public long ID{get;set;}
public string NOTAMRec{get;set;}
......
public string ItemA{get;set;}
}
And add this into an ObservableCollection.
Problem - I wanted to sort my collection in this order. No matter how many MyModels I add into this collection, Models whose ItemA equals to "LOVEU" will always in the top of this list, and so when I display this list to my user, they will always see the MyModels with LOVEU in the first place.
Thanks!