Class UnityCascadeMenuView
Runtime view that hosts a CascadeMenuRenderer and is resolvable by Id from a menu transition (registered with the IViewRouter via the cascade view service). On Show() it builds a fresh CascadeMenuModel from the definition's root node through a DefaultCascadeMenuContext, binds the renderer, and polls input each frame in Serenity.Menu.Infrastructure.Cascade.View.UnityCascadeMenuView.Update. Cancelling at the base page, or resolving a leaf, returns to the configured opener view through the router.
Namespace: Serenity.Menu.Infrastructure.Cascade.View
Assembly: Serenity.UnityMenu.Infrastructure.dll
Syntax
public sealed class UnityCascadeMenuView : UnityViewBase
Remarks
The SerenityUiContext and renderer are built lazily on first show (mirroring how a game host builds them) so the view does not depend on service-locator readiness at install time.
Constructors
UnityCascadeMenuView()
Declaration
public UnityCascadeMenuView()
Methods
Configure(UnityCascadeViewDefinition, IEventDispatcherService, IViewRouter, IViewBrowserService, ILogService, AudioPlayerPlayClip, string)
Injects the definition and the services the view needs (called by the factory).
Declaration
public void Configure(UnityCascadeViewDefinition definition, IEventDispatcherService eventDispatcherService, IViewRouter viewRouter, IViewBrowserService viewBrowserService, ILogService logService, AudioPlayerPlayClip audioPlayerPlayClip, string audioServiceId)
Parameters
| Type | Name | Description |
|---|---|---|
| UnityCascadeViewDefinition | definition | The cascade view definition (root node, layout, return view id). |
| IEventDispatcherService | eventDispatcherService | Dispatcher forwarded to the cascade context for leaf signals. |
| IViewRouter | viewRouter | Router used to return to the opener view on cancel/resolve. |
| IViewBrowserService | viewBrowserService | Browser history service the view pops its own entry from before returning to its opener (see Serenity.Menu.Infrastructure.Cascade.View.UnityCascadeMenuView.ReturnToOpener). |
| ILogService | logService | Logging service. |
| AudioPlayerPlayClip | audioPlayerPlayClip | |
| string | audioServiceId |
Hide()
Declaration
public override void Hide()
Show()
Declaration
public override void Show()