Exemplo n.º 1
0
    public void UpdateStack(INavigationController controller, object toView)
    {
        // Activate restored
        controller.ActivateView(restoreStackInfo.View, restoreStackInfo.RestoreParameter);
        restoreStackInfo.RestoreParameter = null;

        // Remove old
        for (var i = controller.ViewStack.Count - 1; i > controller.ViewStack.Count - level - 1; i--)
        {
            controller.CloseView(controller.ViewStack[i].View);
        }

        controller.ViewStack.RemoveRange(controller.ViewStack.Count - level, level);
    }
    public void UpdateStack(INavigationController controller, object toView)
    {
        // Stack new
        controller.ViewStack.Add(new ViewStackInfo(descriptor, toView));

        controller.OpenView(toView);

        // Remove old
        for (var i = controller.ViewStack.Count - 2; i >= controller.ViewStack.Count - level - 2; i--)
        {
            controller.CloseView(controller.ViewStack[i].View);
        }

        controller.ViewStack.RemoveRange(controller.ViewStack.Count - level - 2, level + 1);
    }
Exemplo n.º 3
0
    public void UpdateStack(INavigationController controller, object toView)
    {
        // Stack new
        controller.ViewStack.Add(new ViewStackInfo(descriptor, toView));

        controller.OpenView(toView);

        // Remove old
        var count = controller.ViewStack.Count;

        if (count > 1)
        {
            var index = count - 2;

            controller.CloseView(controller.ViewStack[index].View);

            controller.ViewStack.RemoveAt(index);
        }
    }