public void AddCreature(Creature creature) { if (Creatures.Count == 0) { ActiveCreature = creature; } Creatures.Add(creature); }
public static void MySort <TSource, TKey>(this AdvisableCollection <TSource> observableCollection, Func <TSource, TKey> keySelector) { var a = observableCollection.OrderBy(keySelector).ToList(); observableCollection.Clear(); foreach (var b in a) { observableCollection.Add(b); } }