public void FixOrder() { Layers.Sort(l => l.Order); for (var i = 0; i < Layers.Count; i++) Layers[i].Order = i; }