The MapSuiteExplorer has a nice implementation in the left panel of a "table of content" showing the current layers of the map and giving you the possibilty to show/hide layers and change the order.
Is it possible to get the source code for the MapSuiteExplorer?