In my wpf application I have a listview containing elements where I want to be able to write position attributes following formats: 1,2,3; 1a, 1b, 1c; 1)a), 1)b), 1)c); 1.1, 1.2, 1.3;
These position attributes are of type string and I want to order them automatically by size and substeps.
I tried this:
public class ClassXY
{
public string Position;
}
ObservableCollection<ClassXY> _myCollection = new ...;
_myCollection.OrderBy(p => p.Position);
_myCollection.OrderBy(p => Convert.ToDouble(p.Position));
Of course this didn't work for me, substeps in any format are always added at the end. Is there a way to to this without completely doing it on my own?