csharp
public static class DocumentCommandsThe command ids a document answers, and the one call that makes an element answer them.
Remarks
⚠ Answered through the command route rather than by a service, which is the whole point of putting them here. An application with two documents open in two panels has two answers to ⌘S, and the right one is decided by where the focus is — the route already walks focus → parents → root and picks the nearest handler, so a panel that hosts a document registers these and nothing else has to know how many panels there are. A save routed to "the application's document" is the bug this shape does not have.
Fields and properties (2)
public const string SaveWrite the nearest document out.
public const string RevertThrow the nearest document's changes away.
Methods (1)
public static void Install(UiElement element)Makes an element answer Save and Revert for the document it hosts.
Used by (3)
- ShellHelloUi
- DerivedDirtyStateTestsVixen.Ui.Tests
- EditableDocumentTestsVixen.Ui.Tests