Class StyleRepository
Represents dynamic style repository.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Flow.Model.Styles
Assembly: Telerik.Windows.Documents.Flow.dll
Syntax
public class StyleRepository
Properties
Document
Gets the document to which this style collection belongs to.
Declaration
public RadFlowDocument Document { get; }
Property Value
RadFlowDocument
The document. |
Styles
Gets an enumeration of the styles added to the repository.
Declaration
public IEnumerable<Style> Styles { get; }
Property Value
System.Collections.Generic.IEnumerable<Style>
The styles. |
Methods
Add(Style)
Adds the specified style.
Declaration
public void Add(Style style)
Parameters
Style
style
The style. |
Exceptions
System.ArgumentNullException
|
AddBuiltInStyle(String)
Adds built-in style. Use IDs from BuiltInStyleNames class.
Declaration
public Style AddBuiltInStyle(string styleId)
Parameters
System.String
styleId
The ID of the built-in style. |
Returns
Style
The built-in style, added to the repository. |
Exceptions
System.ArgumentException
|
Clear()
Removes all styles from the repository.
Declaration
public void Clear()
Contains(String)
Determines whether there is a style with a given id in the repository.
Declaration
public bool Contains(string styleId)
Parameters
System.String
styleId
The style id. |
Returns
System.Boolean
true if |
GetDefaultStyle(StyleType)
Gets the default style for a given type.
Declaration
public Style GetDefaultStyle(StyleType type)
Parameters
StyleType
type
The type. |
Returns
Style
The default style or null if such is not present in the repository. |
GetStyle(String)
Gets a style by id.
Declaration
public Style GetStyle(string styleId)
Parameters
System.String
styleId
The style id. |
Returns
Style
The style with the given id or null if such is not present in the repository. |
Remove(String)
Removes the specified style by style id.
Declaration
public void Remove(string styleId)
Parameters
System.String
styleId
The style id. |
Remove(Style)
Removes the specified style.
Declaration
public void Remove(Style style)
Parameters
Style
style
The style. |