ClassFixedContentEditorBase
Base for fixed-content editors that centralizes text and graphics state and offers scoped save/restore for rendering settings. Derive from this to apply consistent formatting while drawing content without manually tracking property stacks.
Definition
Namespace:Telerik.Windows.Documents.Fixed.Model.Editing
Assembly:Telerik.Windows.Documents.Fixed.dll
Syntax:
public abstract class FixedContentEditorBase
Inheritance: objectFixedContentEditorBase
Derived Classes:
Properties
GraphicProperties
Gets the graphic properties that control the visual appearance of graphical elements such as shapes, lines, and fills in the fixed content. This includes properties like colors, line thickness, line styles, and filling options.
Declaration
public GraphicProperties GraphicProperties { get; }
Property Value
The current GraphicProperties instance for this editor.
TextProperties
Gets the text state that is responsible for the text properties in the fixed content.
Declaration
public TextProperties TextProperties { get; }
Property Value
The text state.
Methods
RestoreGraphicProperties()
Restores the graphic properties to the previously saved state. This method is automatically called when a disposable object returned by SaveGraphicProperties() is disposed.
Declaration
public void RestoreGraphicProperties()
RestoreProperties()
Restores both text and graphic properties to their previously saved states. This method is automatically called when a disposable object returned by SaveProperties() is disposed.
Declaration
public void RestoreProperties()
RestoreTextProperties()
Restores the text properties to the previously saved state. This method is automatically called when a disposable object returned by SaveTextProperties() is disposed.
Declaration
public void RestoreTextProperties()
SaveGraphicProperties()
Saves the current graphic properties state and returns a disposable object that will automatically restore the previous state when disposed. This enables a clean way to temporarily modify graphic properties within a scope.
Declaration
public IDisposable SaveGraphicProperties()
Returns
An IDisposable object that will restore the graphic properties when disposed.
SaveProperties()
Saves both text and graphic properties simultaneously and returns a disposable object that will automatically restore both property sets when disposed. This is more efficient than calling SaveTextProperties() and SaveGraphicProperties() separately.
Declaration
public IDisposable SaveProperties()
Returns
An IDisposable object that will restore both text and graphic properties when disposed.
SaveTextProperties()
Saves the current text properties state and returns a disposable object that will automatically restore the previous state when disposed. This allows for temporary text formatting changes within a specific scope.
Declaration
public IDisposable SaveTextProperties()
Returns
An IDisposable object that will restore the text properties when disposed.