Skip to content

Instantly share code, notes, and snippets.

@dgwaldo
Created October 16, 2014 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgwaldo/8057907f4d1cb862d658 to your computer and use it in GitHub Desktop.
Save dgwaldo/8057907f4d1cb862d658 to your computer and use it in GitHub Desktop.
Custom Sort For ListCollectionView
public class FluidSortComparer : Comparer<FluidPointViewModel>
{
public override int Compare(FluidPointViewModel x, FluidPointViewModel y)
{
if (x == null | y == null) return 0;
if (x.Temperature > y.Temperature) return 1;
if (x.Temperature < y.Temperature) return -1;
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment