logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class TemplateBuilder

    Maps a TemplateParams onto a region tree (IRegionNode), assigning ids, sizes, content modes and — for navbar templates — fully-wired navbar targets. Pure and unit-testable; the generator turns the returned tree into assets.

    Inheritance
    object
    TemplateBuilder
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Infrastructure.Editor.Builder
    Assembly: Serenity.UnityUi.Infrastructure.Editor.dll
    Syntax
    public static class TemplateBuilder
    Remarks

    Size rules baked in (the constraints that bite when hand-authored): a scrollable container's menu children are Auto() (never FLEX/PERCENT); a composite child is never AUTO (Flex/Fixed); a navbar is Fixed on the main axis while content is Flex; switcher Views are Flex so the active one fills.

    Methods

    Build(TemplateParams)

    Builds the region tree for the given parameters.

    Declaration
    public static ContainerNode Build(TemplateParams p)
    Parameters
    Type Name Description
    TemplateParams p

    The template parameters.

    Returns
    Type Description
    ContainerNode

    The root container node.

    In this article
    © 2026 Serenity. All Rights Reserved