Swapping Edit/View Views recommendations

Nov 10, 2008 at 3:34 PM
I have implemented something similar to the UIComposition Quickstart use of EmployeeDetailsView switching for a View/Edit scenerio in a project.  I don't really like it (it just smells bad), because I have a named view for "View-{Id}" and an "Edit-{Id}".  That said, it does work.

I feel the "Edit-" prefix is a bad remnant of the fact that the Region for Edit and View could be the same.  I say could, because I have a designer that is working on a few layouts and one shows the edit screen as kind of a modal control floating in the center of the screen with a darkened background overlaying everything else (a-la the UAC popup).

The Region names are defined as follows:
    class RegionNames { 
        public const string ViewRegion = "ViewRegion";
        public const string EditRegion = ViewRegion;
    }

In that case, we would have the EditRegion named differently and likely use a Load Routed event to do the UI glitz.

My question is, how would you guys organize both this composite view and the controller/presenter interactions?