logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UiOption

    Represents a UI option with various properties and behaviors.

    Inheritance
    object
    UiOption
    Implements
    IFoundationSettings
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Domain.Entities
    Assembly: Serenity.Ui.Domain.dll
    Syntax
    public class UiOption : IFoundationSettings

    Constructors

    UiOption()

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

    Declaration
    public UiOption()

    UiOption(string, string, string, UiComponentValueType, UiComponentInteractionType, UiOptionValue, UiOptionValue, bool, bool, IEnumerable<EventDispatcherSignal>)

    Initializes a new instance of the UiOption class with the specified parameters.

    Declaration
    public UiOption(string id, string viewId, string label, UiComponentValueType valueType, UiComponentInteractionType interactionType, UiOptionValue value, UiOptionValue defaultValue, bool isTranslatingLabel, bool isTranslatingValue, IEnumerable<EventDispatcherSignal> onSubmitSignals)
    Parameters
    Type Name Description
    string id

    The unique identifier of the option.

    string viewId

    The view identifier of the option.

    string label

    The display label of the option.

    UiComponentValueType valueType

    The value type of the option.

    UiComponentInteractionType interactionType

    The interaction type of the option.

    UiOptionValue value

    The current value of the option.

    UiOptionValue defaultValue

    The default value of the option.

    bool isTranslatingLabel

    Whether the label is being translated.

    bool isTranslatingValue

    Whether the value is being translated.

    IEnumerable<EventDispatcherSignal> onSubmitSignals

    The signals to be dispatched when the option is submitted.

    Fields

    DefaultValue

    Declaration
    public UiOptionValue DefaultValue
    Field Value
    Type Description
    UiOptionValue

    The default value of the option.

    Guid

    Declaration
    public string Guid
    Field Value
    Type Description
    string

    The globally unique identifier of the option.

    Id

    Declaration
    public string Id
    Field Value
    Type Description
    string

    The unique identifier of the option.

    InteractionType

    Declaration
    public UiComponentInteractionType InteractionType
    Field Value
    Type Description
    UiComponentInteractionType

    The interaction type of the option.

    IsTranslatingLabel

    Declaration
    public bool IsTranslatingLabel
    Field Value
    Type Description
    bool

    Whether the label is being translated.

    IsTranslatingValue

    Declaration
    public bool IsTranslatingValue
    Field Value
    Type Description
    bool

    Whether the value is being translated.

    Label

    Declaration
    public string Label
    Field Value
    Type Description
    string

    The display label of the option.

    OnSubmitSignal

    Declaration
    public EventDispatcherSignal OnSubmitSignal
    Field Value
    Type Description
    EventDispatcherSignal

    Deprecated single submit signal, retained only so options authored before OnSubmitSignals keep dispatching their one signal until re-saved. Read through GetSubmitSignals().

    OnSubmitSignals

    Declaration
    public List<EventDispatcherSignal> OnSubmitSignals
    Field Value
    Type Description
    List<EventDispatcherSignal>

    The signals dispatched when the option is submitted, in order. Replaces the former single OnSubmitSignal; submit options (and former modal buttons) can now carry several signals.

    Value

    Declaration
    public UiOptionValue Value
    Field Value
    Type Description
    UiOptionValue

    The current value of the option.

    ValueType

    Declaration
    public UiComponentValueType ValueType
    Field Value
    Type Description
    UiComponentValueType

    The value type of the option.

    ViewId

    Declaration
    public string ViewId
    Field Value
    Type Description
    string

    The view identifier of the option.

    Methods

    GetSubmitSignals()

    Returns the effective submit signals: OnSubmitSignals when it has entries, otherwise the legacy single OnSubmitSignal wrapped in a list, or empty when neither is set. Never null.

    Declaration
    public IReadOnlyList<EventDispatcherSignal> GetSubmitSignals()
    Returns
    Type Description
    IReadOnlyList<EventDispatcherSignal>

    The signals to dispatch when this option is submitted.

    GetValue()

    Gets the current value of the option.

    Declaration
    public UiOptionValue GetValue()
    Returns
    Type Description
    UiOptionValue

    The current value of the option.

    ToString()

    Gets string representation of the UiOption.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the UiOption.

    Overrides
    object.ToString()

    Implements

    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved