skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class StyleRepository

Manages the collection of styles in a document, supporting registration, retrieval, and default style tracking.

Inheritance
System.Object
StyleRepository
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Flow.Model.Styles
Assembly: Telerik.Windows.Documents.Flow.dll

Syntax

public class StyleRepository

Properties

Document

Gets the document that owns this style repository.

Declaration
public RadFlowDocument Document { get; }
Property Value
RadFlowDocument

The document.

Styles

Gets all styles currently registered in the repository.

Declaration
public IEnumerable<Style> Styles { get; }
Property Value
System.Collections.Generic.IEnumerable<Style>

The styles.

Methods

Add(Style)

Registers the specified style in the repository and associates it with this document.

Declaration
public void Add(Style style)
Parameters
Style style

The style.

Exceptions
System.ArgumentNullException

style is part of another style repository.

AddBuiltInStyle(String)

Creates and registers a built-in style by its identifier; returns the newly added 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

styleId is not an ID of a built-in style.

Clear()

Unregisters all styles from the repository.

Declaration
public void Clear()

Contains(String)

Checks whether a style with the specified identifier exists in the repository.

Declaration
public bool Contains(string styleId)
Parameters
System.String styleId

The style id.

Returns
System.Boolean

true if styleId is found in the StyleRepository; otherwise, false.

GetDefaultStyle(StyleType)

Retrieves the default style for the specified style type, or null if none is registered.

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)

Retrieves the style with the specified identifier, or null if not found.

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)

Unregisters the style with the specified identifier from the repository.

Declaration
public void Remove(string styleId)
Parameters
System.String styleId

The style id.

Remove(Style)

Unregisters the specified style from the repository.

Declaration
public void Remove(Style style)
Parameters
Style style

The style.

Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.