/// <summary> /// Close the current model and navigate to model provided /// </summary> /// <param name="modelProvider"></param> public void CloseCurrentModelAndNavigateTo(Func <Model> modelProvider) { if (OpenedModelStack.Count > 0) { OpenedModelStack.Pop(); } Model model = modelProvider(); OpenedModelStack.Push(model); }
/// <summary> /// Opens model /// </summary> /// <param name="modelProvider">the activeModel factory</param> public void OpenModel(Func <Model> modelProvider) { Model model = modelProvider(); OpenedModelStack.Push(model); }