Interface IModalService
Interface for a modal service handling UI modals.
Namespace: Serenity.Modal.Application.Interfaces.Services
Assembly: Serenity.Modal.Application.dll
Syntax
public interface IModalService : IService, IFoundationSettings
Remarks
Extends the IService interface.
Methods
GetCurrentModal()
Gets the current active modal, if any.
Declaration
IUiModal GetCurrentModal()
Returns
| Type | Description |
|---|---|
| IUiModal |
InitializeService(object, IEventDispatcherService, IFoundationViewElementFactory, IModalButtonFactory, IUiComponentFactory, IUiThemeDefinition, IUiService, IPlayerInputService, AudioPlayerPlayClip, string, ILogService, string)
Initializes the modal service with the specified parameters.
Declaration
void InitializeService(object canvas, IEventDispatcherService eventDispatcherService, IFoundationViewElementFactory fameworkViewElementFactory, IModalButtonFactory modalButtonFactory, IUiComponentFactory modalFactory, IUiThemeDefinition theme, IUiService uiService, IPlayerInputService playerInputService, AudioPlayerPlayClip audioPlayerPlayClip, string audioPlayerServiceId, ILogService logService, string controllerId)
Parameters
| Type | Name | Description |
|---|---|---|
| object | canvas | The canvas object where the modal will be displayed. |
| IEventDispatcherService | eventDispatcherService | The event dispatcher service for handling events. |
| IFoundationViewElementFactory | fameworkViewElementFactory | The factory for creating foundation view elements. |
| IModalButtonFactory | modalButtonFactory | The factory for creating modal button components. |
| IUiComponentFactory | modalFactory | The factory for creating modal UI components. |
| IUiThemeDefinition | theme | The UI theme definition for styling the modal. |
| IUiService | uiService | The UI service for managing UI elements. |
| IPlayerInputService | playerInputService | The player input service for handling user input. |
| AudioPlayerPlayClip | audioPlayerPlayClip | The use case for playing audio clips. |
| string | audioPlayerServiceId | The ID of the audio player service. |
| ILogService | logService | The log service for logging information. |
| string | controllerId | The ID of the controller to be used for player input. |
ShowModal(OnShowModalInput)
Shows a modal with the specified input data.
Declaration
void ShowModal(OnShowModalInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| OnShowModalInput | input | The input data for showing the modal. |