Api Sandbox UI PanelRenderTreeBuilder
class

PanelRenderTreeBuilder

public class PanelRenderTreeBuilder : RenderTreeBuilder

This is a tree renderer for panels. If we ever use razor on other ui we'll want to make a copy of this class and do the specific things to that.

Methods

virtual Void AddLocation(String filename, Int32 line, Int32 column)

Add the current source location. Used to record in which file the element was created.

virtual Void OpenElement(Int32 sequence, String elementName)
virtual Void OpenElement(Int32 sequence, String elementName, Object key = null)

Start working on this element

Void AddAttributeObject(Int32 sequence, String attrName, Object value)

Handles "style" and "class" attributes..

Void AddAttributeString(Int32 sequence, String attrName, String value)

Handles "style" and "class" attributes..

virtual Void AddStyleDefinitions(Int32 sequence, String styles)

Styles from a style block

virtual Void AddAttribute(Int32 sequence, Action<T> value)
virtual Void CloseElement()

Finish working on this element

virtual Void AddContent(Int32 sequence, T content)

Handles text content within an element

virtual Void AddReferenceCapture(Int32 sequence, T current, Action<T> value)
virtual Void SetRenderFragment(Action<T, RenderFragment> setter, RenderFragment builder)
virtual Void SetRenderFragmentWithContext(RenderFragment<U>> getter, RenderFragment<U>> setter, RenderFragment<U> builder)
Void AddAttributeAction(Int32 sequence, String attrName, Action value)

Handles @onclick=@( () =&gt; DoSomething( "boobies" ) )

Void AddAttributeAction(Int32 sequence, String attrName, Func<Task> value)
virtual Void AddMarkupContent(Int32 sequence, String markupContent)

Add markup to the current element

virtual Void OpenElement(Int32 sequence)
virtual Void OpenElement(Int32 sequence, Object key)

Create a panel of type T

Void AddAttributeWithSetter(Int32 sequence, Object value, Action<T> setter)
virtual Void AddBind(Int32 sequence, String propertyName, Func<T> get, Action<T> set)
Assembly: Sandbox.Engine Namespace: Sandbox.UI Full Name: Sandbox.UI.PanelRenderTreeBuilder