This question received a code-only low-quality answer that the OP accepted.
I had downvoted that answer, because as the moderator note mentions:
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.
Answers that don't include explanations may be removed - don't get me wrong, I generally agree with removing low-quality, code dump answers. But this one was accepted by the OP, with a justification:
@RubberDuck I have accepted this answer as the RemoveAt and Insert part in the switchTabs sub is good. Even if it is winforms it is still viable in wpf. – RedLaser May 16 at 12:06
The moderator-deleted answer cannot be undeleted by community votes now, and we're sitting with question that, in my opinion, is lacking context, left unanswered with a deleted answer, a frustrated new user, and a puzzled OP.
What happened here? What should have happened?