Esempio n. 1
0
        public void LoadAllChildrenWidgets(bool bIsNail)
        {
            if (items == null)
            {
                items = new ObservableCollection <WidgetPreViewModeBase>();
            }
            items.Clear();

            if (!_page.IsOpened)
            {
                _page.Open();
            }

            IPageView view = _page.PageViews.GetPageView(_styleGuid);

            if (view == null)
            {
                _page.Close();
                return;
            }
            foreach (IWidget wdg in _page.Widgets)
            {
                WidgetPreViewModeBase preItem = ReadOnlyWidgetFactory.CreateWidget(wdg, bIsNail);
                preItem.ChangeCurrentPageView(view);
                if (preItem == null)
                {
                    continue;
                }
                items.Add(preItem);
            }
            //_page.Close();
        }
Esempio n. 2
0
        public void LoadAllChildrenWidgets()
        {
            if (_items == null)
            {
                _items = new ObservableCollection <WidgetPreViewModeBase>();
            }
            _items.Clear();

            _master.MasterPage.Open();
            IPageView view = _master.MasterPage.PageViews.GetPageView(StyleGID);

            if (view == null)
            {
                return;
            }

            foreach (IWidget wdg in _master.MasterPage.Widgets)
            {
                WidgetPreViewModeBase preItem = ReadOnlyWidgetFactory.CreateWidget(wdg, _IsNail);
                preItem.ChangeCurrentPageView(view);
                if (preItem == null)
                {
                    continue;
                }
                _items.Add(preItem);
            }
        }