Skip to main content

EmptyUndoUnit Class

Definition​

Assembly:Avalonia.Controls.Documents
Package:Avalonia.Controls.Documents

Sentinel Avalonia.Controls.Documents.Undo.IUndoUnit returned by empty / no-op undo scopes (when undo is disabled, or while a replay is in progress and Avalonia.Controls.Documents.Undo.UndoManager.BeginUndoUnit(string,Nullable{Avalonia.Controls.Documents.Undo.SelectionSnapshot}) short-circuits to an empty scope). Never appears on Avalonia.Controls.Documents.TextModel.DocumentChangedEventArgs.UndoUnit — that property is when no real unit was opened, so null and Avalonia.Controls.Documents.Undo.EmptyUndoUnit.Instance retain distinct semantics.

public class EmptyUndoUnit

Inheritance: object -> EmptyUndoUnit

Implements:IUndoUnit

Properties​

NameDescription
DescriptionGets a description of the operation.
InstanceSingleton instance.

Description Property​

Gets a description of the operation.

public string Description { get; set; }

Instance Property​

Singleton instance.

public Avalonia.Controls.Documents.Undo.EmptyUndoUnit Instance { get; set; }