New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Provides a key/value attribute bag for editor tools backed by a StateBag.

Definition

Namespace:Telerik.Web.UI.Editor

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public sealed class AttributeCollection

Inheritance: objectAttributeCollection

Inherited Members object.ToString()object.Equals(object, object)object.ReferenceEquals(object, object)object.GetType()

Constructors

C#
public AttributeCollection(StateBag bag)
Parameters:bagStateBag

Properties

Gets the number of attributes contained in the collection.

C#
public int Count { get; }

Gets a collection containing the keys in the attribute collection.

C#
public ICollection Keys { get; }

Gets or sets an attribute value using a StandardDropDownProperties key.

C#
public string this[StandardDropDownProperties key] { get; set; }
Parameters:keyStandardDropDownProperties

The standard drop-down property key.

Property Value:

The attribute value, or null if the key does not exist.

Gets or sets an attribute value by its string key.

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

The attribute key.

Property Value:

The attribute value, or null if the key does not exist.

Methods

Adds or updates an attribute with the specified key and value.

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

The attribute key.

valuestring

The attribute value.

Removes all attributes from the collection.

C#
public void Clear()

Determines whether the specified object is equal to the current collection by comparing keys and values.

C#
public override bool Equals(object o)
Parameters:oobject

The object to compare with the current collection.

Returns:

bool

True if the collections contain the same keys and values; otherwise, false.

Overrides: object.Equals(object)

Returns a hash code for the current collection based on its keys and values.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Removes the attribute with the specified key.

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

The key of the attribute to remove.