Back to API Reference
Interface

IFormatStyleSource

abstract

Source of the style a TextFormattingBehavior command toggles. Applies a style already configured on the component, in that style's own markup syntax — it never creates or registers anything, so on a field that has no matching style the command is inert. ReferencedStyle addresses by modifier type. Implement to add a custom resolution.

Implementations(1)

Types that implement IFormatStyleSource.

public abstract bool Toggle()

Toggles the style on the selection (or the pending typing style at a caret). Returns whether it is now on.

public Action Changed

Raised after configuration changes that can affect the resolved or emitted style. Mutable custom implementations must raise this for every such change so an owning formatting behavior can reconcile.