Class InlineDialogConfirmationPolicy
Optional, reusable confirmation policy for an InlineDialog. When a confirmable
key-produced result (Cancel or Abort)
is requested and this policy includes that kind, the dialog enters an internal confirmation mode
(a Yes/No message box) before completing. Choosing
Yes completes with the originally
requested kind; No (or Escape) dismisses the confirmation and resumes the original dialog.
Loop-/externally-produced kinds (TokenCancel, Timeout, SystemCancel) are never confirmed.public sealed record InlineDialogConfirmationPolicy : IEquatable<InlineDialogConfirmationPolicy>
- Inheritance
-
InlineDialogConfirmationPolicy
- Implements
- Inherited Members
Properties
Confirm
The result kinds to confirm before completing. Defaults to none.
public DialogConfirmationKinds Confirm { get; init; }
Property Value
ConfirmAbort
Confirm Abort only.
public static InlineDialogConfirmationPolicy ConfirmAbort { get; }
Property Value
ConfirmCancel
Confirm Cancel only.
public static InlineDialogConfirmationPolicy ConfirmCancel { get; }
Property Value
ConfirmCancelAndAbort
public static InlineDialogConfirmationPolicy ConfirmCancelAndAbort { get; }
Property Value
MessageProvider
Optional per-kind confirmation message override. Receives the requested
DialogResultKind; returning
null (or leaving this unset) falls back to the
localized default (Tui_Confirm_Cancel_Message / Tui_Confirm_Abort_Message).public Func<DialogResultKind, string?>? MessageProvider { get; init; }
Property Value
None
No confirmation — completes immediately for every result kind (current default behavior).
public static InlineDialogConfirmationPolicy None { get; }