LayoutFarm.CustomWidgets.HtmlBox.GetPrimaryRenderElement C# (CSharp) Method

GetPrimaryRenderElement() public method

public GetPrimaryRenderElement ( RootGraphic rootgfx ) : RenderElement
rootgfx RootGraphic
return RenderElement
        public override RenderElement GetPrimaryRenderElement(RootGraphic rootgfx)
        {
            if (htmlRenderBox == null)
            {
                var newFrRenderBox = new HtmlRenderBox(rootgfx, this.Width, this.Height);
                newFrRenderBox.SetController(this);
                newFrRenderBox.HasSpecificSize = true;
                newFrRenderBox.SetLocation(this.Left, this.Top);
                //set to this field if ready
                this.htmlRenderBox = newFrRenderBox;
            }
            switch (this.waitingContentKind)
            {
                default:
                case WaitingContentKind.NoWaitingContent:
                    break;
                case WaitingContentKind.HtmlDocument:
                    {
                        LoadHtmlDom(this.waitingHtmlDoc);
                    }
                    break;
                case WaitingContentKind.HtmlFragmentString:
                    {
                        LoadHtmlFragmentString(this.waitingHtmlString);
                    }
                    break;
                case WaitingContentKind.HtmlString:
                    {
                        LoadHtmlString(this.waitingHtmlString);
                    }
                    break;
            }

            return htmlRenderBox;
        }
        //-----------------------------------------------------------------------------------------------------