Skip to main content

Dialog

Family: Shells & Overlays
Namespace: Tessera.Controls

Use Dialog when this interaction is the best match for your screen workflow.

When to use

  • User must confirm/cancel a disruptive action.
  • You need a focused transient decision surface.

Minimal usage

csharp.cs
using Tessera.Controls;
using Tessera.Layout;

var dialog = new Dialog
{
    Title = "Delete draft?",
    Message = "This action cannot be undone.",
    IsOpen = true
};

var status = new StatusBar { LeftText = "Awaiting decision" };
dialog.Closed += (_, e) => status.LeftText = $"Dialog result: {e.Result}";

return Screen.Build(window =>
{
    window.Footer(1, status);
    window.Body(body => body.Center(dialog, width: 54, height: 10));
});

Common pitfalls

  • Do not stack many dialogs; resolve one decision at a time.
  • Always provide an explicit cancel path.

Public properties

PropertyType
BodyTextStyleTesseraStyle
BorderBorderStyle
BorderStyleTextTesseraStyle
FocusedBorderStyleTextTesseraStyle
FocusedTitleStyleTesseraStyle
FocusMarkerstring
IsFocusedbool
IsVisiblebool
LastResultDialogResult
PaddingThickness
ShowFocusMarkerbool
Titlestring
TitleStyleTesseraStyle

Public events

EventType
AcceptedEventHandler?
ClosedEventHandler<DialogClosedEventArgs>?
DismissedEventHandler?