Esempio n. 1
0
        PageAndUIObject GetOrCreatePageAndUIObject()
        {
            var uiObj = context.PageUIObjectLoader.GetUIObject(Page);

            if (uiObj != null)
            {
                return(createdPageAndUIObject ?? (createdPageAndUIObject = new PageAndUIObject(this, CreateUIObject(uiObj))));
            }

            // Try to pick a visible child
            foreach (var child in Children)
            {
                if (!child.TreeNode.IsHidden)
                {
                    return(child.VisiblePageAndUIObject);
                }
            }

            if (Children.Count == 0)
            {
                return(null);
            }
            return(Children[0].VisiblePageAndUIObject);
        }
Esempio n. 2
0
 public void ClearUICache()
 {
     // Make sure we don't show hidden pages
     pageAndUIObject = null;
 }