MessageWindow
Class in Oadm.Sdk.Client.Controls · Oadm.Sdk.Client.dll
The message and confirmation dialog of the host and of plugin dialogs (one window, never a copy): title bar, the message, and a DialogFooter with Cancel on the left and the primary confirm button on the right. Use MessageWindow.ConfirmAsync / MessageWindow.ShowMessageAsync; the window size follows the message. A confirm button that deletes or removes something (MessageWindow.IsDestructive) is the red Button.danger.
public sealed class MessageWindow : WindowInherits Window
Guide: UI kit
Properties
Section titled “Properties”CancelButton
Section titled “CancelButton”Button CancelButton { get; }The Cancel button (for tests).
CancelText
Section titled “CancelText”string? CancelText { get; set; }Text of the Cancel button; null or empty hides it (a plain message with OK only).
ConfirmButton
Section titled “ConfirmButton”Button ConfirmButton { get; }The confirm button (for tests).
ConfirmText
Section titled “ConfirmText”string? ConfirmText { get; set; }The text of the confirm button; red when it starts with Delete, Remove or Release.
Heading
Section titled “Heading”string? Heading { get; set; }The window title (title bar and task switcher).
IsDanger
Section titled “IsDanger”bool IsDanger { get; set; }The confirm button is the red danger button (set from MessageWindow.ConfirmText; can be overridden).
Message
Section titled “Message”string? Message { get; set; }The message.
Methods
Section titled “Methods”ConfirmAsync
Section titled “ConfirmAsync”static Task<bool> ConfirmAsync(Window owner, string title, string message, string confirmText, string cancelText = "Cancel")Asks for confirmation; true when the user clicked confirmText.
IsDestructive
Section titled “IsDestructive”static bool IsDestructive(string? confirmText)True for confirm texts of irreversible actions: they start with Delete, Remove, Release or Format (“Delete all”, “Remove”, “Release”, “Format”: formatting deletes the recordings). One rule for the host and every plugin.
ShowMessageAsync
Section titled “ShowMessageAsync”static Task ShowMessageAsync(Window owner, string title, string message)Shows a message with an OK button.