Thanks for the code sample - I have a similar context (menu region and main content region in which user controls are switched in and out) but am implementing things the MVVM way (so no code-behind!).
To do the switching, the view model is bound to the view, but the essential code in the menu region is:
where each view subscribes to EventShowOneView (I will come up with a better name) which delivers the viewname of the view required to be shown. A view consuming this event will then show itself if the name is theirs, else it hides itself. e.g.
I also made use of the Show/Hide fcns in WPFRegionExtensions - see http://blogs.southworks.net/matiasb/2009/07/02/how-to-hide-views-inside-composite-application-guidance-aka-prism-v2-regions/ That show/hide code could be useful in factoring out
your foreach loop... poss replace with one line: regionManager.Regions["MainRegion"].Show(button.Tag.ToString());
With my kludgy hack (see prev post) I have a workable solution - at least until the next gotcha rears its head!