LayoutFarm.HtmlBoxes.HtmlHost.ReleaseHtmlLayoutVisitor C# (CSharp) Method

ReleaseHtmlLayoutVisitor() public method

public ReleaseHtmlLayoutVisitor ( LayoutFarm lay ) : void
lay LayoutFarm
return void
        public void ReleaseHtmlLayoutVisitor(LayoutFarm.HtmlBoxes.LayoutVisitor lay)
        {
            lay.UnBind();
            this.htmlLayoutVisitorStock.Enqueue(lay);
        }

Usage Example

        public static MyHtmlVisualRoot CreateHtmlVisualRoot(
            HtmlHost htmlHost,
            WebDom.WebDocument htmldoc,
            HtmlRenderBox htmlFrgmentRenderBox)
        {
            //1. builder
            RenderTreeBuilder renderTreeBuilder = htmlHost.GetRenderTreeBuilder();
            //-------------------------------------------------------------------


            //2. generate render tree
            ////build rootbox from htmldoc

            CssBox rootElement = renderTreeBuilder.BuildCssRenderTree(htmldoc,
                                                                      htmlHost.BaseStylesheet,
                                                                      htmlFrgmentRenderBox);
            //3. create small htmlContainer

            MyHtmlVisualRoot htmlContainer = new MyHtmlVisualRoot(htmlHost);

            htmlContainer.WebDocument = htmldoc;
            htmlContainer.SetRootCssBox(rootElement);
            htmlContainer.SetMaxSize(htmlFrgmentRenderBox.Width, 0);
            //htmlContainer.SetRootRenderElement(htmlFrgmentRenderBox);

            LayoutVisitor lay = htmlHost.GetSharedHtmlLayoutVisitor(htmlContainer);

            htmlContainer.PerformLayout(lay);
            htmlHost.ReleaseHtmlLayoutVisitor(lay);
            htmlFrgmentRenderBox.SetHtmlContainer(htmlContainer, rootElement);
            return(htmlContainer);
        }
All Usage Examples Of LayoutFarm.HtmlBoxes.HtmlHost::ReleaseHtmlLayoutVisitor