PowerArgs.Cli.FocusManager.Pop C# (CSharp) Method

Pop() public method

Pops the current focus context. This should be called if you've implemented a modal dialog like experience and your dialog has just closed. Pop() will automatically restore focus on the previous context.
public Pop ( ) : void
return void
        public void Pop()
        {
            if(focusStack.Count == 1)
            {
                throw new InvalidOperationException("Cannot pop the last item off the focus stack");
            }

            var context = focusStack.Pop();
            TryRestoreFocus();
            FirePropertyChanged(nameof(StackDepth));
        }