New to Telerik UI for WPFStart a free 30-day trial

Represents a collection of all document variables in a RadDocument.

Definition

Namespace:Telerik.Windows.Documents.Model

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

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

Inheritance: objectDocumentVariableCollection

Implements: ICollection<KeyValuePair<string, object>>IDictionary<string, object>IEnumerableIEnumerable<KeyValuePair<string, object>>

Constructors

Initializes a new instance of the DocumentVariableCollection class.

C#
public DocumentVariableCollection(RadDocument owner, DocumentVariableCollection toCopyFrom)
Parameters:ownerRadDocument

The associated document.

toCopyFromDocumentVariableCollection

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

Initializes a new instance of the DocumentVariableCollection class.

C#
public DocumentVariableCollection(RadDocument owner)
Parameters:ownerRadDocument

The associated document.

Properties

Gets the number of elements contained in the ICollection<T>.

C#
public int Count { get; }

Implements: ICollection<KeyValuePair<string, object>>.Count

Gets a value indicating whether the ICollection<T> is read-only.

C#
public bool IsReadOnly { get; }

Implements: ICollection<KeyValuePair<string, object>>.IsReadOnly

Gets an ICollection<T> containing the keys of the IDictionary<TKey, TValue>.

C#
public ICollection<string> Keys { get; }

Implements: IDictionary<string, object>.Keys

Gets or sets the variable with the specified key.

C#
public object this[string key] { get; set; }
Parameters:keystring

The key of the variable.

Property Value:

The document variable.

Implements: IDictionary<string, object>.this[string]

Gets an ICollection<T> containing the values in the IDictionary<TKey, TValue>.

C#
public ICollection<object> Values { get; }

Implements: IDictionary<string, object>.Values

Methods

Adds an element with the provided key and value to the IDictionary<TKey, TValue>.

C#
public void Add(string key, object value)
Parameters:keystring

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

valueobject

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

Implements: IDictionary<string, object>.Add(string, object)

Removes all items from the ICollection<T>.

C#
public void Clear()

Implements: ICollection<KeyValuePair<string, object>>.Clear()

Determines whether the IDictionary<TKey, TValue> contains an element with the specified key.

C#
public bool ContainsKey(string key)
Parameters:keystring

The key to locate in the IDictionary<TKey, TValue>.

Returns:

bool

true if the IDictionary<TKey, TValue> contains an element with the key; otherwise, false.

Implements: IDictionary<string, object>.ContainsKey(string)

Evaluates the variable value.

C#
public object EvaluateVariableValue(string variableName)
Parameters:variableNamestring

Name of the variable.

Returns:

object

The value of the variable.

Returns an enumerator that iterates through the collection.

C#
public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
Returns:

IEnumerator<KeyValuePair<string, object>>

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

Implements: IEnumerable<KeyValuePair<string, object>>.GetEnumerator()

Removes the element with the specified key from the IDictionary<TKey, TValue>.

C#
public bool Remove(string key)
Parameters:keystring

The key of the element to remove.

Returns:

bool

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

Implements: IDictionary<string, object>.Remove(string)

Gets the value associated with the specified key.

C#
public bool TryGetValue(string key, out object value)
Parameters:keystring

The key whose value to get.

valueobject

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:

bool

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

Implements: IDictionary<string, object>.TryGetValue(string, out object)