I got this to work by creating a base controller that handled the OnActionExecuted event. In OnActionExecutedevent, I assign the main page. Then I made all my other controllers inherited from the base class.
public class BaseController : Controller
{
protected override void OnActionExecuted(ActionExecutedContext filterContext) {
var action = filterContext.Result as ViewResult;
if (action != null) {
action.MasterName = MyApp.Properties.Settings.Default.Theme;
}
base.OnActionExecuted(filterContext);
}
}
,