skip navigation
  • Product Bundles

    DevCraft

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

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue 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 Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
  • 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

Represents dynamic style repository.

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 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

style is part of another style repository.

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

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

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 styleId is found in the StyleRepository; otherwise, false.

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.

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.