Ejemplo n.º 1
0
        //public static IModelLayoutViewItem AddItem(this IModelLayoutGroup group, Expression<Func<object, object>> property)
        //{

        //    var mc = (property.Body as UnaryExpression);
        //    var mm = mc.Operand as MemberExpression;
        //    return group.AddItem(mm.Member.Name);
        //}

        public static IModelLayoutViewItem AddItem(this  IModelTabbedGroup tab, string viewItem)
        {
            var item = tab.AddNode <IModelLayoutViewItem>();

            item.ViewItem = item.ViewItems[viewItem];
            return(item);
        }
        private IModelLayoutGroup AddEditorToTabbedGroup(IModelTabbedGroup rootTabNode, string tabId, IModelPropertyEditor editor, FlowDirection direction)
        {
            IModelLayoutGroup rootTabPageNode = (IModelLayoutGroup)rootTabNode[tabId];

            if (rootTabPageNode == null)
            {
                rootTabPageNode           = rootTabNode.AddNode <IModelLayoutGroup>(tabId);
                rootTabPageNode.Caption   = CaptionHelper.ConvertCompoundName(tabId);
                rootTabPageNode.Direction = direction;
            }
            AddLayoutItemNode(rootTabPageNode, editor);
            return(rootTabPageNode);
        }