components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.injection-description
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-injection-react-comment-line1
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-injection-react-comment-line2
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-injection-react-comment-line3
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-injection-react-comment-line4
import { useDialogService } from '@powerportalspro/react-fluent';
function MyComponent() {
const dialogs = useDialogService();
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-injection-react-placeholder
}using IDialogService = PowerPortalsPro.Web.Blazor.Services.IDialogService;
[Inject]
private IDialogService _dialogService { get; set; } = null!;components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.confirmation-description
const result = await dialogs.showConfirmationAsync(
'components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-message',
{
title: 'components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-title',
primaryText: 'components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-yes',
secondaryText: 'components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-no',
},
);
if (!result.cancelled) {
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-after-comment
}var result = await _dialogService.ShowConfirmationAsync(
"components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-message",
title: "components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-title",
primaryText: "components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-yes",
secondaryText: "components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-no");
if (!result.Cancelled)
{
// components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-confirmation-after-comment
}components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.messages-description
await dialogs.showInfoAsync('components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-info-message', 'components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-info-title');
await dialogs.showSuccessAsync('components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-success-message', 'components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-success-title');
await dialogs.showWarningAsync('components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-warning-message', 'components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-warning-title');
await dialogs.showErrorAsync('components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-error-message', 'components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-error-title');await _dialogService.ShowInfoAsync("components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-info-message", "components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-info-title");
await _dialogService.ShowSuccessAsync("components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-success-message", "components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-success-title");
await _dialogService.ShowWarningAsync("components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-warning-message", "components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-warning-title");
await _dialogService.ShowErrorAsync("components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-error-message", "components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.snippet-messages-error-title");components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.parameters-description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.result-description
components.PowerPortalsPro.Demo.Client.Customizations.Pages.Utilities.DialogService.DialogServiceDemoPage.main-demo-description
components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.parameters | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
ShowConfirmationAsync | string message string title string primaryText string secondaryText | Task<DialogResult> | 提供された message と2つのアクションボタンで確認ダイアログが表示され、その後 ユーザーが一つ選ぶことができます。返 Services.DialogResult は DialogResult.Cancelled ユーザーが二次(マイナス)オプションを選択すると |
ShowErrorAsync | string message string title string primaryText | Task<DialogResult> | 提供された message とのエラーダイアログが表示され、ユーザーがそれを終了するのを待ちます。 |
ShowInfoAsync | string message string title string primaryText | Task<DialogResult> | 提供された message に関する情報ダイアログが表示され、ユーザーが終了するのを待ちます。 |
ShowSuccessAsync | string message string title string primaryText | Task<DialogResult> | 提供された message との成功ダイアログが表示され、ユーザーが終了するのを待ちます。 |
ShowWarningAsync | string message string title string primaryText | Task<DialogResult> | 提供された message で警告ダイアログが表示され、ユーザーがそれを終了するのを待ちます。 |
ShowConfirmationAsyncmessage と2つのアクションボタンで確認ダイアログが表示され、その後 ユーザーが一つ選ぶことができます。返 Services.DialogResult は DialogResult.Cancelled ユーザーが二次(マイナス)オプションを選択すると ShowErrorAsyncmessage とのエラーダイアログが表示され、ユーザーがそれを終了するのを待ちます。ShowInfoAsyncmessage に関する情報ダイアログが表示され、ユーザーが終了するのを待ちます。ShowSuccessAsyncmessage との成功ダイアログが表示され、ユーザーが終了するのを待ちます。ShowWarningAsyncmessage で警告ダイアログが表示され、ユーザーがそれを終了するのを待ちます。components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.default | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
Cancelled | bool | False | ダイアログがキャンセルされたかどうか(例:ユーザーが確認せずに終了した)を示す値が付与されます。 |
Data | Object? | ダイアログが閉じたときに返されるオプションのデータペイロード。 |
CancelledDatacomponents.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.name | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.parameters | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.type | components.PowerPortalsPro.Demo.Client.Customizations.Components.Documentation.ApiDocumentation.description |
|---|---|---|---|
Cancel | Object data | DialogResult | キャンセルされた結果を表す Services.DialogResult を作成し、オプションでデータペイロードを搭載します。 |
Ok<T> | T result | DialogResult | resultをデータペイロードとして運ぶ、確認された結果を表すServices.DialogResultを作成します。 |
CancelServices.DialogResult を作成し、オプションでデータペイロードを搭載します。Ok<T>resultをデータペイロードとして運ぶ、確認された結果を表すServices.DialogResultを作成します。