Skip to main content

MessageBox Class

Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI

Modal dialog with title, body text, and footer buttons. Add buttons with MessageBox.AddButton; each returns a handle whose Clicked event you subscribe to. Call MessageBox.Hide to dismiss.

public class MessageBox : Widget

Constructors​

MessageBox(Widget parent)​

public MessageBox(Widget parent)

Create a message box inside parent.

ParameterTypeDescription
parentWidgetContaining widget (typically the active UI.Screen).

Methods​

AddButton(string text)​

public MessageBoxButton AddButton(string text)

Add a footer button; returns a handle to subscribe to its Clicked event.

Returns MessageBoxButton

Hide()​

public void Hide()

Dismiss the dialog without destroying it; call again by making the Widget.Visible parent re-show it.

SetBody(string body)​

public void SetBody(string body)

Set the dialog body text.

ParameterTypeDescription
bodystringBody string.

SetTitle(string title)​

public void SetTitle(string title)

Set the dialog title text.

ParameterTypeDescription
titlestringTitle string.