public int CompareTo(IListBoxItem other) { TrapResource trap = other as TrapResource; if (trap != null) return CompareTo(trap); return 0; }