PrismNotification.WPF
                             
                            
                                1.0.7
                            
                        
                    
        
        
                                There is a newer version of this package available.
                                
See the version list below for details.
                    See the version list below for details.
dotnet add package PrismNotification.WPF --version 1.0.7
NuGet\Install-Package PrismNotification.WPF -Version 1.0.7
        
        
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
                    
    
    <PackageReference Include="PrismNotification.WPF" Version="1.0.7" />
        
        
For projects that support PackageReference, copy this XML node into the project file to reference the package.
                    
    
    <PackageVersion Include="PrismNotification.WPF" Version="1.0.7" />
<PackageReference Include="PrismNotification.WPF" />
        
        
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
                    
    
    paket add PrismNotification.WPF --version 1.0.7
        
        
 The NuGet Team does not provide support for this client. Please contact its maintainers for support.
                    
    
    #r "nuget: PrismNotification.WPF, 1.0.7"
        
        
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
                    
    
    #:package PrismNotification.WPF@1.0.7
        
        
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
                    
    
    #addin nuget:?package=PrismNotification.WPF&version=1.0.7
#tool nuget:?package=PrismNotification.WPF&version=1.0.7
        
        
 The NuGet Team does not provide support for this client. Please contact its maintainers for support.
                    
    
    PrismNotification.WPF
WPF 用 Prism Library の Dialog Service をベースに、メッセージダイアログを作成しました。 動作は SampleWPFApp プロジェクトで確認できます。
事前準備
App.RegisterTypes() でメッセージダイアログを登録します。
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
    NotificationDialogService.RegisterDialog(containerRegistry);
}
メッセージダイアログを使用したい ViewModel で、 IDialogService を使えるようにします。 (Using the Dialog Service を参照)
ShowDialog 呼び出し
NotificationDialogService.ShowDialog で呼び出します。
NotificationDialogService.ShowDialog(
    _dialogService,
    "Hello world.",
    NotificationDialogButtons.YesNoCancel,
    dialogResult =>
    {
        switch (dialogResult.Result)
        {
            case ButtonResult.Yes:
                ClickResult = "Yes button clicked.";
                break;
            case ButtonResult.No:
                ClickResult = "No button clicked.";
                break;
            case ButtonResult.Cancel:
                ClickResult = "Cancel button clicked.";
                break;
            default:
                break;
        }
    });
第3引数 は NotificationDialogButtons Enum です。
| NotificationDialogButtons | 説明 | 
|---|---|
| Yes | |
| No | |
| Ok | |
| Cancel | |
| YesNo | Yes ボタン、 No ボタンを表示。 | 
| OkCancel | OK ボタン、 Cancel ボタンを表示。 | 
| YesNoCancel | Yes ボタン、 No ボタン、 Cancel ボタンを表示。 | 
NotificationDialogButtons.Ok にすれば、 OK ボタンのみ表示します。
多言語対応
ボタン名のデフォルト表示は英語です。 英語以外の表示できる言語は下記の通りです。
| コード | 言語 | 
|---|---|
| ja | 日本語 | 
| Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net9.0-windows was computed. net10.0-windows was computed. | 
        
        Compatible target framework(s)
    
    
        
        Included target framework(s) (in package)
    
    Learn more about Target Frameworks and .NET Standard.
- 
                                                    
net6.0-windows7.0
- Prism.Wpf (>= 8.1.97)
 
 
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | 
|---|---|---|
| 2.0.5 | 180 | 12/21/2024 | 
| 2.0.4 | 164 | 12/21/2024 | 
| 2.0.3 | 229 | 8/31/2024 | 
| 2.0.2 | 193 | 8/31/2024 | 
| 2.0.1 | 192 | 8/31/2024 | 
| 2.0.0 | 182 | 8/30/2024 | 
| 1.0.7 | 448 | 1/23/2023 | 
| 1.0.6 | 400 | 11/27/2022 | 
| 1.0.5 | 539 | 5/31/2022 | 
| 1.0.4 | 528 | 5/31/2022 | 
| 1.0.3 | 574 | 4/21/2022 | 
| 1.0.2 | 564 | 4/16/2022 | 
| 1.0.1 | 548 | 4/14/2022 | 
| 1.0.0 | 556 | 4/13/2022 |