logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IViewBrowserService

    Service for managing view navigation within the application.

    Namespace: Serenity.ViewBrowser.Application.Interfaces
    Assembly: Serenity.ViewBrowser.Application.dll
    Syntax
    public interface IViewBrowserService : IService, IFoundationSettings

    Methods

    ClearHistory()

    Clear the navigation history.

    Declaration
    void ClearHistory()

    GetCurrentView()

    Get the current active view.

    Declaration
    IViewBase GetCurrentView()
    Returns
    Type Description
    IViewBase

    The current active view.

    GetHistory()

    Retrieve the navigation history.

    Declaration
    List<IViewBase> GetHistory()
    Returns
    Type Description
    List<IViewBase>

    A list of views representing the navigation history.

    GoBack()

    Navigate back to the previous view in the navigation stack.

    Declaration
    IViewBase GoBack()
    Returns
    Type Description
    IViewBase

    The view navigated back to.

    Push(ViewBrowserPushInput)

    Push a new view onto the navigation stack.

    Declaration
    IViewBase Push(ViewBrowserPushInput input)
    Parameters
    Type Name Description
    ViewBrowserPushInput input

    The input data required to push the new view.

    Returns
    Type Description
    IViewBase

    The newly pushed view.

    TryGetCurrentView(out IViewBase)

    Get the current active view without throwing when the history is empty.

    Declaration
    bool TryGetCurrentView(out IViewBase view)
    Parameters
    Type Name Description
    IViewBase view

    The current active view, or null when the history is empty.

    Returns
    Type Description
    bool

    true when a current view exists; false when the history is empty.

    TryGoBack(out IViewBase)

    Navigate back to the previous view without throwing when the history is empty.

    Declaration
    bool TryGoBack(out IViewBase view)
    Parameters
    Type Name Description
    IViewBase view

    The view navigated back to, or null when the history was empty.

    Returns
    Type Description
    bool

    true when a view was popped; false when the history was empty.

    In this article
    © 2026 Serenity. All Rights Reserved