C# ListBox的SortDescription中的PriorityBinding类行为
我必须按出发日期对C# ListBox的SortDescription中的PriorityBinding类行为,c#,wpf,sorting,listbox,C#,Wpf,Sorting,Listbox,我必须按出发日期对列表框进行排序,但当该日期为空时,我必须按返回日期对列表框进行排序 在我的SortDescription中,如果路径为空,我需要一个PriorityBinding或FallBackValue 假设我有4次旅行。3次旅行属于外向型,因此只有外向日期。 一个是退货类型,只有退货日期 如果我这样做: <CollectionViewSource x:Key="TripItems" Source="{Binding TripDatas}" > <Collecti
列表框
进行排序,但当该日期为空时,我必须按返回日期对列表框
进行排序
在我的SortDescription
中,如果路径为空,我需要一个PriorityBinding
或FallBackValue
假设我有4次旅行。3次旅行属于外向型,因此只有外向日期。
一个是退货类型,只有退货日期
如果我这样做:
<CollectionViewSource x:Key="TripItems" Source="{Binding TripDatas}" >
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="Outward.PlannedDate" />
<scm:SortDescription PropertyName="Return.PlannedDate" />
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
我要:
- 出境日期2010年1月10日
- 出境日期2010年1月11日
- 出境日期2010年1月12日
- 返回日期2010年1月11日
- 出境日期2010年1月10日
- 返回日期2010年1月11日
- 出境日期2010年1月11日
- 出境日期2010年1月12日
有人能帮忙吗?按出发日期、返回日期排序很抱歉我不够清楚,我想,我更新了问题。