Class RichComposition
- Namespace
- RichEdit.Core
- Assembly
- RichEdit.Core.dll
A provisional rich root owned by one input session while committed content remains frozen.
public sealed class RichComposition : IDisposable
- Inheritance
-
RichComposition
- Implements
- Inherited Members
Properties
Generation
Gets a generation incremented by every successful provisional update.
public long Generation { get; }
Property Value
Selection
Gets the primary selection in provisional coordinates.
public RichSelection Selection { get; }
Property Value
Snapshot
Gets provisional content with an invalid document revision.
public RichDocumentSnapshot Snapshot { get; }
Property Value
Methods
Cancel()
Discards provisional content and retains the original content, selection, revision, and history.
public void Cancel()
Commit(string?)
Commits the final validated root as one authored transaction and one undo unit.
public RichEditResult Commit(string? description = null)
Parameters
descriptionstring
Returns
Dispose()
Cancels an uncommitted composition.
public void Dispose()
Update(Action<RichDocumentEdit>, RichSelection?)
Stages native input operations without publishing document content or creating history.
public void Update(Action<RichDocumentEdit> update, RichSelection? selection = null)
Parameters
updateAction<RichDocumentEdit>selectionRichSelection
Remarks
A resulting selection can be supplied here or through the builder, but not both.