Interface IUiService
Interface for a UI service.
Namespace: Serenity.Ui.Application.Interfaces
Assembly: Serenity.Ui.Application.dll
Syntax
public interface IUiService : IService, IFoundationSettings
Methods
GetFloatIncrement()
Gets the configured increment step used when modifying float-type values in UI interactions.
Declaration
float GetFloatIncrement()
Returns
| Type | Description |
|---|---|
| float | The float increment step value. |
GetFontSize()
Gets the current font size of the UI.
Declaration
float GetFontSize()
Returns
| Type | Description |
|---|---|
| float | The current font size of the UI. |
GetScale()
Gets the current scale of the UI.
Declaration
float GetScale()
Returns
| Type | Description |
|---|---|
| float | The current scale of the UI. |
GetTheme()
Gets the current theme definition of the UI.
Declaration
IUiThemeDefinition GetTheme()
Returns
| Type | Description |
|---|---|
| IUiThemeDefinition | The current theme definition of the UI. |
GetThemeSounds()
Gets the resolved theme sounds for the current UI theme.
Declaration
IUiThemeSounds GetThemeSounds()
Returns
| Type | Description |
|---|---|
| IUiThemeSounds | The resolved theme sounds with mapped audio clips. |
HidePrimaryInputPrompt()
Hides the primary input prompt.
Declaration
void HidePrimaryInputPrompt()
Initialize(IEventDispatcherService, IUiSettings, object, ILogService, IPrimaryInputPromptView)
Initializes the UI service with the provided parameters.
Declaration
void Initialize(IEventDispatcherService eventDispatcherService, IUiSettings uiSettings, object canvas, ILogService logService, IPrimaryInputPromptView primaryInputPromptView)
Parameters
| Type | Name | Description |
|---|---|---|
| IEventDispatcherService | eventDispatcherService | The event dispatcher service for handling UI events. |
| IUiSettings | uiSettings | The UI settings to configure the service. |
| object | canvas | The canvas object (e.g., a Canvas component in Unity) where the UI will be rendered. |
| ILogService | logService | The logging service for logging UI-related information. |
| IPrimaryInputPromptView | primaryInputPromptView | The primary input prompt view for displaying input prompts. |
SetFontSize(SetFontSizeInput)
Sets the font size of the UI.
Declaration
void SetFontSize(SetFontSizeInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| SetFontSizeInput | input | The input data containing the new font size value. |
SetScale(UiSetScaleInput)
Sets the scale of the UI.
Declaration
void SetScale(UiSetScaleInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| UiSetScaleInput | input | The input data containing the new scale value. |
ShowPrimaryInputPrompt()
Shows the primary input prompt.
Declaration
void ShowPrimaryInputPrompt()