public sealed class DialogA panel over the whole window that has to be dealt with before anything else.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Modality is three separate things and a control that does two of them is broken. The backdrop stops the pointer reaching what is behind — a real element covering the viewport, not a colour. IsFocusScope stops Tab walking out into the window behind, which is the half that pointer-only implementations forget. And the focus is moved into the dialog when it opens and put back where it was when it closes, which is the half that everyone forgets.
⚠ The focus is restored to whatever had it, not to whatever opened it. Those are usually the same element and are not always: a dialog opened by a keyboard shortcut was opened by nothing at all. Remembering the focus is the version that works in both cases.
Fields and properties (9)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
public UiElement BackdropThe sheet that covers what is behind.
public UiElement SurfaceThe dialog's own box, inside the backdrop.
public UiElement HeaderThe strip at the top.
public UiElement BodyWhere the content goes.
public UiElement FooterWhere the buttons go.
public IconButton CloseButtonThe close button in the header.
public string? TitleThe heading.
public UiElement TitlePartThe heading's element.
Methods (3)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
protected override void OnOpened()protected override void OnClosed(CloseReason reason)Called after it closes.
Used by (9)
- ControlVisualTestsVixen.Ui.Controls.Tests
- OverlayInteractionTestsVixen.Ui.Controls.Tests
- SurfaceTestsVixen.Ui.Controls.Tests
- AssetPickerTestsVixen.Editor.App.Tests
- ClosingTestsVixen.Editor.App.Tests
- DialogServiceVixen.Editor.Ui
- DialogSessionVixen.Editor.Ui
- DialogTestsVixen.Editor.Ui.Tests
- ScenarioTestsVixen.Editor.App.Tests