Preheat oven to 350 degrees F (175 degrees C). Lightly grease a 9x13 inch baking dish.
In a bowl, mix the thousand island dressing, sour cream, and onion.
Arrange the dark and light rye bread cubes in the bottom of the prepared baking dish, reserving about 1/2 cup each for topping. Layer the bread with sauerkraut and corned beef. Spread the dressing mixture over the corned beef. Sprinkle with Swiss cheese, top with remaining bread cubes, and drizzle with margarine.
Cover, and bake 15 minutes in the preheated oven. Uncover, and continue baking 10 minutes, or until bubbly and lightly browned.