The DisplayMode of a web parts page is an interesting thing and, when you look at the syntax for changing it you'll probably wonder why an enum wasn't used. Here's an example showing the code that is required to change the mode to "catalog" mode:
WebPartManager wpm = WebPartManager.GetCurrentWebPartManager(this) ;
wpm.DisplayMode = WebPartManager.CatalogDisplayMode;
If you've done any amount of .NET programming then you would most likely have expected to have seen something which looks a bit more like this:
WebPartManager wpm = WebPartManager.GetCurrentWebPartManager(this) ;
wpm.DisplayMode = DisplayModes.CatalogDisplayMode;
There are actually 5 "standard" display modes in total - BrowseDisplayMode, CatalogDisplayMode, ConnectDisplayMode, DesignDisplayMode, and EditDisplayMode - and each of those has an associated property of the same name which hangs off of the WebPartManager instance. These properties are actually instances of a class which inherits from an abstract base class named WebPartDisplayMode. This is done because the mode changing actually requires certain logic and state which is held within this class. For example, because of the impact of things such as personalization, each mode may behave slightly differently on a per-user basis. The initial values of the display mode instance are set by the WebPartManager as you'd expect.
The 5 "standard" display modes are:
BrowseDisplayMode
This is just as it suggests - browse mode. Browse mode is the default mode for a page and is the mode that you you'd be in if you were just browsing a web parts page. No special permissions are required to enter this mode.
CatalogDisplayMode
Switching the page into "catalog mode" displays the catalog user interface so that the user can add new web parts to the page at runtime. When you attempt to change to this mode there is a check to ensure that you have a CatalogZone control on the page before the mode is changed. If you have not added a CatalogZone control to the page then that mode will not be supported for the page and an exception will be thrown.
ConnectDisplayMode
Before you can switch the page into "connect" mode you will need to have a ConnectionsZone on the page and you will need to be authenticated. When in "connect" mode users can manage dynamic connections by displaying the ConnectionsZone. When in this mode, each part that is configured for connections will automatically have a "Connect" verb added to its verbs collection; to display the ConnectionsZone you click on the connect verb for a specific part and the ConnectionsZone will allow you to manage the dynamic connections for that part.
DesignDisplayMode
"Design" mode allows users to drag web parts between zones. When you switch into this mode each zone the user interface for each zone changes appearance to indicate that web parts can be dragged onto it.
EditDisplayMode
In "edit" mode users can move web parts between zones just as they can when in "design" mode. Switching the page into "edit" mode displays the editor user interface so that the user can add eidt web parts properties at runtime. When you attempt to change to this mode there is a check to ensure that you have an EditorZone control on the page before the mode is changed. If you have not added a EditorZone control to the page then that mode will not be supported for the page and an exception will be thrown.