Vixen
02b45cc4
csharp
public sealed class Toast

A brief message that appears in a corner and goes away.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ It does not dismiss itself, because nothing here has a clock. Tick is what expires it, on the same terms as GestureRecognizer.Tick and Tick — a host with a frame loop calls it, and one that does not gets toasts that stay until they are dismissed. Which is a defensible interface in its own right and is not what most callers will expect, so it is said here rather than left to be discovered.

Fields and properties (8)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public TimeSpan Duration
  • public string? Message

    What it says.

  • public UiElement MessagePart

    The message's element.

  • public IconButton CloseButton

    The button that takes it away early.

  • public Icon LeadingIcon

    An icon before the message, created the first time it is asked for.

  • public static readonly UiPropertyKey DurationProperty

    Identity for Duration.

Methods (2)

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

  • public void ClearDuration()

    Unsets Duration, so it takes its default or its ancestor's value again.

Used by (6)

  • OverlayLifetimeTestsVixen.Ui.Controls.Tests
  • SurfaceTestsVixen.Ui.Controls.Tests
  • ToastHostVixen.Ui.Controls
  • EditorSessionVixen.Editor.Testing
  • NotificationCenterVixen.Editor.Ui
  • ServiceTestsVixen.Editor.Ui.Tests