logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface ICompositeView

    A composite view at the application boundary: a view made of child views that the business layer can coordinate without knowing the Unity implementation. In particular it exposes the "switcher" behaviour a navigation rail relies on — activating one child and hiding its siblings.

    Namespace: Serenity.Ui.Application.Interfaces.Views
    Assembly: Serenity.Ui.Application.dll
    Syntax
    public interface ICompositeView : IViewBase, IFoundationSettings

    Properties

    ContentMode

    How this composite presents its children: all together (STACK) or only the active one (SWITCHER). Lets navigation code treat detail-open/close (a switcher concern) differently from always-visible stacked regions.

    Declaration
    ContainerContentMode ContentMode { get; }
    Property Value
    Type Description
    ContainerContentMode

    Methods

    ActivateChild(string)

    Activates the child view with the given id. In a switcher container this makes that child the only visible one; in a stack container it is a no-op. Safe to call with an unknown id (ignored).

    Declaration
    void ActivateChild(string childViewId)
    Parameters
    Type Name Description
    string childViewId

    The IViewBase.Id of the child to activate.

    AddChild(IViewBase)

    Registers a child view so it participates in this composite's show/hide cascade.

    Declaration
    void AddChild(IViewBase child)
    Parameters
    Type Name Description
    IViewBase child

    The child view to add.

    GetActiveChildId()

    The id of the currently active child, or null when none / not a switcher.

    Declaration
    string GetActiveChildId()
    Returns
    Type Description
    string

    The active child id, or null.

    GetChildViewIds()

    The ids of this composite's direct child views, in layout order.

    Declaration
    IReadOnlyList<string> GetChildViewIds()
    Returns
    Type Description
    IReadOnlyList<string>

    The ordered child ids.

    GetChildren()

    Gets the registered child views in layout order.

    Declaration
    IReadOnlyList<IViewBase> GetChildren()
    Returns
    Type Description
    IReadOnlyList<IViewBase>

    A read-only view over the children.

    SetContentConfig(bool, bool)

    Sets the content-display + initial-focus configuration. isAlwaysShowingContent makes a SWITCHER show its default child on first show (vs blank); focusInitialView routes initial input to that content (vs a sibling nav rail).

    Declaration
    void SetContentConfig(bool isAlwaysShowingContent, bool focusInitialView)
    Parameters
    Type Name Description
    bool isAlwaysShowingContent

    Show the default child on first show.

    bool focusInitialView

    Give the default content initial input focus.

    SetInitialActiveChild(string)

    Sets the initially active child for switcher mode; empty means start with none shown.

    Declaration
    void SetInitialActiveChild(string childViewId)
    Parameters
    Type Name Description
    string childViewId

    The id of the child to activate on first show, or empty for none.

    See Also

    IViewBase
    In this article
    © 2026 Serenity. All Rights Reserved