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 (Serenity.Ui.Domain.Types.ContainerContentMode.STACK) or only the active one (Serenity.Ui.Domain.Types.ContainerContentMode.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. |
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. |