Class FixedContentEditorBase
Represents the base class for fixed content editing, providing common functionality for text and graphics properties management in the document content. This class serves as the foundation for more specialized content editors.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Fixed.Model.Editing
Assembly: Telerik.Windows.Documents.Fixed.dll
Syntax
public abstract class FixedContentEditorBase
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
GraphicProperties
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
TextProperties
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
System.IDisposable
An System.IDisposable object that will restore the graphic properties when disposed. |
Examples
using (editor.SaveGraphicProperties())
{
editor.GraphicProperties.StrokeColor = new RgbColor(0, 0, 0);
// Draw with temporary properties
} // Original properties are automatically restored here
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
System.IDisposable
An System.IDisposable object that will restore both text and graphic properties when disposed. |
Examples
using (editor.SaveProperties())
{
editor.TextProperties.FontSize = 14;
editor.GraphicProperties.FillColor = new RgbColor(1, 0, 0);
// Draw with temporary properties
} // Original properties are automatically restored here
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
System.IDisposable
An System.IDisposable object that will restore the text properties when disposed. |
Examples
using (editor.SaveTextProperties())
{
editor.TextProperties.FontSize = 14;
// Draw text with temporary properties
} // Original properties are automatically restored here