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
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DocumentVariableCollection

Represents a collection of all document variables in a RadDocument.

Inheritance
System.Object
DocumentVariableCollection
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public class DocumentVariableCollection : Object, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable

Constructors

DocumentVariableCollection(RadDocument)

Initializes a new instance of the DocumentVariableCollection class.

Declaration
public DocumentVariableCollection(RadDocument owner)
Parameters
RadDocument owner

The associated document.

DocumentVariableCollection(RadDocument, DocumentVariableCollection)

Initializes a new instance of the DocumentVariableCollection class.

Declaration
public DocumentVariableCollection(RadDocument owner, DocumentVariableCollection toCopyFrom)
Parameters
RadDocument owner

The associated document.

DocumentVariableCollection toCopyFrom

A collection of document variables which will be added to the associated document.

Properties

Count

Gets the number of elements contained in the System.Collections.Generic.ICollection<>.

Declaration
public int Count { get; }
Property Value
System.Int32

IsReadOnly

Gets a value indicating whether the System.Collections.Generic.ICollection<> is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean

Item[String]

Gets or sets the variable with the specified key.

Declaration
public object this[string key] { get; set; }
Parameters
System.String key

The key of the variable.

Property Value
System.Object

The document variable.

Keys

Gets an System.Collections.Generic.ICollection<> containing the keys of the System.Collections.Generic.IDictionary<, >.

Declaration
public ICollection<string> Keys { get; }
Property Value
System.Collections.Generic.ICollection<System.String>

Values

Gets an System.Collections.Generic.ICollection<> containing the values in the System.Collections.Generic.IDictionary<, >.

Declaration
public ICollection<object> Values { get; }
Property Value
System.Collections.Generic.ICollection<System.Object>

Methods

Add(String, Object)

Adds an element with the provided key and value to the System.Collections.Generic.IDictionary<, >.

Declaration
public void Add(string key, object value)
Parameters
System.String key

The object to use as the key of the element to add.

System.Object value

The object to use as the value of the element to add.

Clear()

Removes all items from the System.Collections.Generic.ICollection<>.

Declaration
public void Clear()

ContainsKey(String)

Determines whether the System.Collections.Generic.IDictionary<, > contains an element with the specified key.

Declaration
public bool ContainsKey(string key)
Parameters
System.String key

The key to locate in the System.Collections.Generic.IDictionary<, >.

Returns
System.Boolean

true if the System.Collections.Generic.IDictionary<, > contains an element with the key; otherwise, false.

EvaluateVariableValue(String)

Evaluates the variable value.

Declaration
public object EvaluateVariableValue(string variableName)
Parameters
System.String variableName

Name of the variable.

Returns
System.Object

The value of the variable.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>>

An enumerator that can be used to iterate through the collection.

Remove(String)

Removes the element with the specified key from the System.Collections.Generic.IDictionary<, >.

Declaration
public bool Remove(string key)
Parameters
System.String key

The key of the element to remove.

Returns
System.Boolean

true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original System.Collections.Generic.IDictionary<, >.

TryGetValue(String, out Object)

Gets the value associated with the specified key.

Declaration
public bool TryGetValue(string key, out object value)
Parameters
System.String key

The key whose value to get.

System.Object value

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns
System.Boolean

true if the object that implements System.Collections.Generic.IDictionary<, > contains an element with the specified key; otherwise, false.

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • 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.