Пример #1
0
        public ScreenRendererPackageFile(ScreenRenderer screenRenderer)
        {
            this.Name = $"{Path}/{LayoutExtension.GetPageName(screenRenderer.Model)}.xml";

            List <IRenderer> childrens = RendererTreeHelper
                                         .FindChildrens <IRenderer>(screenRenderer)
                                         .ToList();

            childrens.Insert(0, screenRenderer);

            this.Model = new ObjectContainer <RendererSurface>()
            {
                Items = childrens
                        .Select(c => new RendererSurface()
                {
                    Guid     = c.Model.Guid,
                    Metadata = c.Metadata,
                    Location = new Point(
                        Canvas.GetLeft(c.Element),
                        Canvas.GetTop(c.Element))
                }).ToList()
            };

            base.CreateStream();
        }
Пример #2
0
        protected override void CreateStream()
        {
            base.CreateStream();

            this.Name = $"{Path}/{LayoutExtension.GetPageName(this.Model)}.xml";
        }