Class OnShowModalInput
Input data transfer object for showing a modal.
Inherited Members
Namespace: Serenity.Modal.Application.DTO
Assembly: Serenity.Modal.Application.dll
Syntax
public class OnShowModalInput
Constructors
OnShowModalInput(string, string, string, List<SerializedComponentData>, bool, bool, UiOption[], ModalDirection, float, bool, int)
Initializes a new instance of the OnShowModalInput class.
Declaration
public OnShowModalInput(string id, string title, string text, List<SerializedComponentData> buttonsData, bool isTranslatingTitle = false, bool isTranslatingText = false, UiOption[] options = null, ModalDirection direction = 0, float optionsGap = 0, bool scrollable = false, int visibleOptionsCount = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The unique identifier for the modal. |
| string | title | The title of the modal. |
| string | text | The text content of the modal. |
| List<SerializedComponentData> | buttonsData | The list of button data for the modal. |
| bool | isTranslatingTitle | Whether the title should be localized at runtime. |
| bool | isTranslatingText | Whether the text should be localized at runtime. |
| UiOption[] | options | |
| ModalDirection | direction | |
| float | optionsGap | |
| bool | scrollable | |
| int | visibleOptionsCount |
Fields
ButtonsData
Declaration
public List<SerializedComponentData> ButtonsData
Field Value
| Type | Description |
|---|---|
| List<SerializedComponentData> | The list of button data for the modal. 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. |
Id
Declaration
public string Id
Field Value
| Type | Description |
|---|---|
| string | The unique identifier for the modal. |
IsTranslatingText
Declaration
public bool IsTranslatingText
Field Value
| Type | Description |
|---|---|
| bool | Whether the text should be treated as a localization key and translated at runtime. |
IsTranslatingTitle
Declaration
public bool IsTranslatingTitle
Field Value
| Type | Description |
|---|---|
| bool | Whether the title should be treated as a localization key and translated at runtime. |
Options
Declaration
public UiOption[] Options
Field Value
| Type | Description |
|---|---|
| UiOption[] | The 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. |
Text
Declaration
public string Text
Field Value
| Type | Description |
|---|---|
| string | The 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
ToString()
Returns a string representation of the OnShowModalInput instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string representation of the instance. |