You can apply custom sorting logic by implementing your own IComparer
and setting it to public CustomSort
property of ListCollectionView
class. But this is not complete answer to your question and rather a direction where you can move forward.
The simplest way you can achieve just this
Class2Colection.OrderBy(s => s.Id).OrderBy(s =>!s.Id.HasValue));
in xaml
is to expose another property in your data class which whould return !Id.HasValue
and sort by it.