protected override IEnumerable<PageActionBase> CreateItems()
        {
            var pageActionContainer = new PageActionContainer(0, ID, ContainerType.GetValueOrDefault(PageActionContainerType.ActionItems));
            pageActionContainer.Properties.CaptionML.Set(CaptionML);
            pageActionContainer.Properties.Description = Description;
            pageActionContainer.Properties.Name = Name;
#if NAV2016
            pageActionContainer.Properties.ToolTipML.Set(ToolTipML);
#endif

            yield return pageActionContainer;

            if (ChildActions != null)
            {
                var variables = new List<PSVariable>() { new PSVariable("ActionIndentation", 1) };
                var childActions = ChildActions
                    .InvokeWithContext(null, variables)
                    .Select(o => o.BaseObject)
                    .Cast<PageActionBase>();

                foreach (var childAction in childActions)
                {
                    yield return childAction;
                }
            }

        }
        protected override IEnumerable <PageActionBase> CreateItems()
        {
            var pageActionGroup = new PageActionGroup(ID, GetIndentation());

            pageActionGroup.Properties.CaptionML.Set(CaptionML);
            pageActionGroup.Properties.ActionContainerType = ContainerType;
            pageActionGroup.Properties.Description         = Description;
            pageActionGroup.Properties.Enabled             = Enabled;
            pageActionGroup.Properties.Image = Image;
            pageActionGroup.Properties.Name  = Name;
#if NAV2016
            pageActionGroup.Properties.ToolTipML.Set(ToolTipML);
#endif
            pageActionGroup.Properties.Visible = Visible;

            yield return(pageActionGroup);

            if (ChildActions != null)
            {
                var variables = new List <PSVariable>()
                {
                    new PSVariable("ActionIndentation", GetIndentation() + 1)
                };

                var childActions = ChildActions
                                   .InvokeWithContext(null, variables)
                                   .Select(o => o.BaseObject)
                                   .Cast <PageActionBase>();

                foreach (var childAction in childActions)
                {
                    yield return(childAction);
                }
            }
        }