public IActionItemManager ShowItem(IActionItem item)
 {
     //pass the instance on to the parent manager.
     parentManager.ShowItem(item);
     //also keep a reference for activation
     scopeItems.Add(item);
     return(this);
 }
            public ActionItemManagerWithParent(IActionItemManager parentManager, ObservableCollection <IActionItem> parentItems, string parentName)
            {
                this.parentItems = parentItems;

                parent = parentItems.FirstOrDefault(item => item.Name == parentName);
                if (parent == null)
                {
                    //if there is no parent item create it and add it to the sibling collection
                    parent = new ActionItem(parentName, null);
                    parentManager.ShowItem(parent);
                }
            }
            public ActionItemManagerWithParent(IActionItemManager parentManager, ObservableCollection<IActionItem> parentItems, string parentName)
            {
                this.parentItems = parentItems;

                parent = parentItems.FirstOrDefault(item => item.Name == parentName);
                if (parent == null)
                {
                    //if there is no parent item create it and add it to the sibling collection
                    parent = new ActionItem(parentName, null);
                    parentManager.ShowItem(parent);
                }
            }