IMessageBoxService.Show 方法(1/2)¶
显示由应用程序活动窗口拥有的模态消息框。
命名空间: Eremex.AvaloniaUI.Controls.ApplicationServices
程序集: Eremex.Common.Contracts.dll
NuGet 包: Eremex.Common.Contracts
声明¶
public DialogResult Show(string text, string caption, MessageBoxButtons buttons,
MessageBoxIcon icon)
参数¶
| 名称 | 类型 | 说明 |
|---|---|---|
| text | string |
消息框主体中显示的消息。 |
| caption | string |
窗口标题。 |
| buttons | MessageBoxButtons |
要提供的按钮集。 |
| icon | MessageBoxIcon |
消息旁边显示的图标。 |
返回值¶
| 类型 | 说明 |
|---|---|
DialogResult |
用户按下的按钮。 |
另请参阅¶
- 枚举 DialogResult
- 枚举 MessageBoxButtons
- 枚举 MessageBoxIcon
- 接口 IMessageBoxService
- 命名空间 Eremex.AvaloniaUI.Controls.ApplicationServices
IMessageBoxService.Show 方法(2/2)¶
显示由指定窗口拥有的模态消息框。
命名空间: Eremex.AvaloniaUI.Controls.ApplicationServices
程序集: Eremex.Common.Contracts.dll
NuGet 包: Eremex.Common.Contracts
声明¶
public DialogResult Show(IWindow? owner, string text, string caption, MessageBoxButtons buttons,
MessageBoxIcon icon)
参数¶
| 名称 | 类型 | 说明 |
|---|---|---|
| owner | IWindow? |
在其上方显示消息框的窗口。为 null 时,使用应用程序的活动窗口。 |
| text | string |
消息框主体中显示的消息。 |
| caption | string |
窗口标题。 |
| buttons | MessageBoxButtons |
要提供的按钮集。 |
| icon | MessageBoxIcon |
消息旁边显示的图标。 |
返回值¶
| 类型 | 说明 |
|---|---|
DialogResult |
用户按下的按钮。 |
另请参阅¶
- 枚举 DialogResult
- 接口 IWindow
- 枚举 MessageBoxButtons
- 枚举 MessageBoxIcon
- 接口 IMessageBoxService
- 命名空间 Eremex.AvaloniaUI.Controls.ApplicationServices
* 本页面使用机器翻译技术翻译。