logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IMenuService

    Interface for a menu service that manages menu views and interactions.

    Namespace: Serenity.Menu.Application.Interfaces.Services
    Assembly: Serenity.Menu.Application.dll
    Syntax
    public interface IMenuService : IService, IFoundationSettings

    Methods

    DeactivateMenuContext()

    Deactivates the current menu context, hiding the active menu view and cleaning up any resources.

    Declaration
    void DeactivateMenuContext()

    GetCurrentView()

    Gets the current active view in the menu service.

    Declaration
    IViewBase GetCurrentView()
    Returns
    Type Description
    IViewBase

    The current active view.

    InitializeService(Dictionary<string, IViewBase>, IViewBrowserService, string)

    Initializes the menu service with the provided menu views.

    Declaration
    void InitializeService(Dictionary<string, IViewBase> menuViews, IViewBrowserService viewBrowserService, string initMenuId)
    Parameters
    Type Name Description
    Dictionary<string, IViewBase> menuViews

    A dictionary of menu views to initialize the service with.

    IViewBrowserService viewBrowserService

    The view browser service for navigation.

    string initMenuId

    The ID of the initial menu to show when ShowInitialMenu is called.

    ShowInitialMenu()

    Shows the initial menu configured during initialization. This is the menu that should be displayed at startup or when returning from gameplay.

    Declaration
    void ShowInitialMenu()

    ShowMenu(string)

    Shows the menu with the specified ID.

    Declaration
    void ShowMenu(string menuId)
    Parameters
    Type Name Description
    string menuId

    The ID of the menu to show.

    In this article
    © 2026 Serenity. All Rights Reserved