StyleRepository
Manages the collection of styles in a document, supporting registration, retrieval, and default style tracking.
Definition
Namespace:Telerik.Windows.Documents.Flow.Model.Styles
Assembly:Telerik.Windows.Documents.Flow.dll
Syntax:
public class StyleRepository
Inheritance: objectStyleRepository
Methods
Registers the specified style in the repository and associates it with this document.
public void Add(Style style)
The style.
Exceptions:style is part of another style repository.
Creates and registers a built-in style by its identifier; returns the newly added style. Use IDs from BuiltInStyleNames class.
public Style AddBuiltInStyle(string styleId)
The ID of the built-in style.
Returns:The built-in style, added to the repository.
Exceptions:styleId is not an ID of a built-in style.
Unregisters all styles from the repository.
public void Clear()
Checks whether a style with the specified identifier exists in the repository.
public bool Contains(string styleId)
The style id.
Returns:true if styleId is found in the StyleRepository; otherwise, false.
Unregisters the style with the specified identifier from the repository.
Unregisters the specified style from the repository.
Properties
Gets the document that owns this style repository.
public RadFlowDocument Document { get; }
The document.
Gets all styles currently registered in the repository.
public IEnumerable<Style> Styles { get; }
The styles.