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 ActionItemManagerWithScope(IActionItemManager parentManager, ObservableCollection<IActionItem> parentItems, object model)
            {
                this.parentManager = parentManager;
                this.parentItems = parentItems;

                //check if the model implements any activation interfaces
                var activatable = model as IActivate;
                if (activatable != null)
                    activatable.Activated += ScopeActivated;

                var deactivatable = model as IDeactivate;
                if (deactivatable != null)
                    deactivatable.Deactivated += ScopeDeactivated;
            }
            public ActionItemManagerWithScope(IActionItemManager parentManager, ObservableCollection <IActionItem> parentItems, object model)
            {
                this.parentManager = parentManager;
                this.parentItems   = parentItems;

                //check if the model implements any activation interfaces
                var activatable = model as IActivate;

                if (activatable != null)
                {
                    activatable.Activated += ScopeActivated;
                }

                var deactivatable = model as IDeactivate;

                if (deactivatable != null)
                {
                    deactivatable.Deactivated += ScopeDeactivated;
                }
            }
            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);
                }
            }