Exemplo n.º 1
0
        public IObjectContainer AddObjects(Stream stream)
        {
            IObjectContainer container = ParentPage.AddObjects(stream);

            foreach (Widget widget in container.WidgetList)
            {
                // Set the created view as the current view because this is the first time when the widget
                // is added in the current document.
                widget.CreatedViewGuid = _viewGuid;

                // Set this flag to false. PlaceWidgetInternal method will set this flag base on checking
                // if this is base view.
                widget.HasBeenPlacedInBaseView = false;

                PlaceWidgetInternal(widget, true);
            }

            foreach (Master master in container.MasterList)
            {
                master.CreatedViewGuid = _viewGuid;

                master.HasBeenPlacedInBaseView = false;

                PlaceMasterInternal(master, true);
            }

            return(container);
        }