logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UiShowModalParameters

    Parameters for configuring a UI component that shows a modal dialog.
    Includes title, text, alignment, buttons, and associated signal type.

    Inheritance
    object
    UiShowModalParameters
    Implements
    IUiShowModalParameters
    Namespace: Serenity.Modal.Application.Components
    Assembly: Serenity.Modal.Application.dll
    Syntax
    public class UiShowModalParameters : UiComponentParameters, IUiShowModalParameters

    Constructors

    UiShowModalParameters()

    Initializes a new instance of the UiShowModalParameters class with default values.

    Declaration
    public UiShowModalParameters()

    UiShowModalParameters(string, string, string, string, string, UiComponentAlignmentType, IFoundationViewElementFactory, AudioPlayerPlayClip, string, IUiThemeSounds, List<SerializedComponentData>)

    Initializes a new instance of the UiShowModalParameters class.

    Declaration
    public UiShowModalParameters(string id, string guid, string signalTypeName, string title, string text, UiComponentAlignmentType alignment, IFoundationViewElementFactory foundationViewElementFactory, AudioPlayerPlayClip audioPlayerPlayClip, string audioServiceId, IUiThemeSounds themeSounds, List<SerializedComponentData> buttons)
    Parameters
    Type Name Description
    string id

    The unique identifier for the UI component.

    string guid

    The globally unique identifier for the UI component.

    string signalTypeName

    The assembly qualified name of the signal type associated with the modal.

    string title

    The title of the modal.

    string text

    The main text content of the modal.

    UiComponentAlignmentType alignment

    The alignment of the modal content.

    IFoundationViewElementFactory foundationViewElementFactory

    Factory for creating foundation view elements.

    AudioPlayerPlayClip audioPlayerPlayClip

    Use case for playing audio clips.

    string audioServiceId

    The identifier for the audio service to use.

    IUiThemeSounds themeSounds

    The theme sounds configuration.

    List<SerializedComponentData> buttons

    Serialized data for reconstructing button components.

    Fields

    Alignment

    Declaration
    public UiComponentAlignmentType Alignment
    Field Value
    Type Description
    UiComponentAlignmentType

    The alignment of the modal content.

    Buttons

    Declaration
    public List<SerializedComponentData> Buttons
    Field Value
    Type Description
    List<SerializedComponentData>

    Serialized data for reconstructing button components. Deprecated in favor of Options.

    Direction

    Declaration
    public ModalDirection Direction
    Field Value
    Type Description
    ModalDirection

    The axis along which the modal lays out its options.

    IsTranslatingText

    Declaration
    public bool IsTranslatingText
    Field Value
    Type Description
    bool

    Whether the text is treated as a localization key and translated at runtime.

    IsTranslatingTitle

    Declaration
    public bool IsTranslatingTitle
    Field Value
    Type Description
    bool

    Whether the title is treated as a localization key and translated at runtime.

    Options

    Declaration
    public UiOption[] Options
    Field Value
    Type Description
    UiOption[]

    Rich options for the modal (sliders, toggles, selectors, submits), modelled like menu options.

    OptionsGap

    Declaration
    public float OptionsGap
    Field Value
    Type Description
    float

    The spacing between consecutive options.

    Scrollable

    Declaration
    public bool Scrollable
    Field Value
    Type Description
    bool

    Whether the options area clamps to VisibleOptionsCount and scrolls the rest.

    SignalTypeName

    Declaration
    public string SignalTypeName
    Field Value
    Type Description
    string

    The assembly qualified name of the signal type associated with the modal.

    Text

    Declaration
    public string Text
    Field Value
    Type Description
    string

    The main text content of the modal.

    Title

    Declaration
    public string Title
    Field Value
    Type Description
    string

    The title of the modal.

    VisibleOptionsCount

    Declaration
    public int VisibleOptionsCount
    Field Value
    Type Description
    int

    How many options are visible at once when Scrollable is on; 0 or less disables clamping.

    Methods

    GetSignalInstance()

    Creates an instance of the signal type specified by SignalTypeName.

    Declaration
    public virtual EventDispatcherSignal GetSignalInstance()
    Returns
    Type Description
    EventDispatcherSignal

    An instance of EventDispatcherSignal or null if instantiation fails.

    ToString()

    Returns a string representation of the UiShowModalParameters instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the instance.

    Implements

    IUiShowModalParameters
    In this article
    © 2026 Serenity. All Rights Reserved