Skip to content

DialogAware

Apply [DialogAware] to a partial class inheriting BindableBase when Prism.Services.Dialogs.IDialogAware is available (Prism.Core).

Usage

csharp
using Prism.Mvvm;
using Prism.SourceGenerators;

[DialogAware(Title = "Confirm")]
public partial class ConfirmViewModel : BindableBase
{
    partial void OnDialogOpenedCore(IDialogParameters parameters) { }
}

Generated members

  • Title property (backed by SetProperty)
  • RequestClose event
  • CanCloseDialogCanCloseDialogCore (default true)
  • OnDialogOpened / OnDialogClosed → partial cores

Diagnostics

IDWhen
PSG0008Class is not partial

Released under the MIT License.

Released under the MIT License.