New to Telerik UI for WinForms? Start a free 30-day trial

Collection of items which can be set as a property grid selected object. It's items would be displayed in the property grid as properties of an object.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class RadPropertyStore : IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged

Inheritance: objectRadPropertyStore

Implements: IEnumerableINotifyCollectionChangedINotifyPropertyChanged

Constructors

Creates a new instance of the RadPropertyStore

C#
public RadPropertyStore()

Properties

Gets the number of items in the collection.

C#
public virtual int Count { get; }

Gets a value indicating whether the collection is read only.

C#
public virtual bool IsReadOnly { get; }

Gets or sets the item at the specified index.

C#
public virtual PropertyStoreItem this[int index] { get; set; }
Parameters:indexint

The index.

Property Value:

The item on the specified index.

Gets or sets the item with the specified name.

C#
public virtual PropertyStoreItem this[string propertyName] { get; set; }
Parameters:propertyNamestring

The property name.

Property Value:

Returns the item if its present in the collection otherwise returns null

Methods

Adds an item to the collection.

C#
public virtual void Add(PropertyStoreItem item)
Parameters:itemPropertyStoreItem

The item to add.

Adds an item to the collection.

C#
public virtual void Add(Type propertyType, string propertyName, object value)
Parameters:propertyTypeType

Type of the item.

propertyNamestring

Name to be displayed in the RadPropertyGrid.

valueobject

Value for the item.

Adds a collection of items to this collection.

C#
public virtual void AddRange(IEnumerable<PropertyStoreItem> items)
Parameters:itemsIEnumerable<PropertyStoreItem>

The collection of items to add.

Clears the entire collection.

C#
public virtual void Clear()

Checks whether a specific item is present in the collection.

C#
public virtual bool Contains(PropertyStoreItem item)
Parameters:itemPropertyStoreItem

The item to check.

Returns:

bool

True if the item is contained in the collection otherwise false.

Copies the items of the collection to the specified array starting from the provided index.

C#
public virtual void CopyTo(PropertyStoreItem[] array, int arrayIndex)
Parameters:arrayPropertyStoreItem[]

The destination array.

arrayIndexint

The index in the destination array.

Gets the generic enumerator for this collection.

C#
public IEnumerator<PropertyStoreItem> GetEnumerator()
Returns:

IEnumerator<PropertyStoreItem>

The generic enumerator.

Gets the index of the item.

C#
public virtual int IndexOf(PropertyStoreItem item)
Parameters:itemPropertyStoreItem

The item which index to return

Returns:

int

The index of the item if found and -1 if item is not in the collection.

Inserts the item on the specified index.

C#
public virtual void Insert(int index, PropertyStoreItem item)
Parameters:indexint

The index to insert on.

itemPropertyStoreItem

The item to insert.

Checks whether an item with the same property name is already present in the store.

C#
protected virtual bool ItemExistsInCollection(PropertyStoreItem item)
Parameters:itemPropertyStoreItem

The item whose property name is checked.

Returns:

bool

true if an item with that name exists; otherwise, false.

Raises CollectionChanged with the supplied collection-change details.

C#
public virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Parameters:eNotifyCollectionChangedEventArgs

The collection change to report.

Creates event data for the item and forwards it to OnItemValueChanged(PropertyStoreItemValueChangedEventArgs).

C#
public virtual void OnItemValueChanged(PropertyStoreItem item)
Parameters:itemPropertyStoreItem

The item whose value setter raised the notification.

Raises ItemValueChanged with the supplied item event data.

C#
public virtual void OnItemValueChanged(PropertyStoreItemValueChangedEventArgs e)
Parameters:ePropertyStoreItemValueChangedEventArgs

The item associated with the value-setter notification.

Forwards the supplied property-change notification to store subscribers.

C#
public virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

The property-change details to report.

Raises PropertyChanged for the specified property name.

C#
public virtual void OnNotifyPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name of the changed property.

Removes the specified item form the collection.

C#
public virtual bool Remove(PropertyStoreItem item)
Parameters:itemPropertyStoreItem

The item to remove from the collection.

Returns:

bool

True if the removal was successful otherwise false.

Removes the item with the specified name form the collection.

C#
public virtual bool Remove(string propertyName)
Parameters:propertyNamestring

The name of the item to remove.

Returns:

bool

True if the removal was successful otherwise false.

Removes an item from the specified index.

C#
public virtual void RemoveAt(int index)
Parameters:indexint

The index to remove on.

Events

Occurs when the store forwards a collection-change notification from its underlying item collection.

C#
public event NotifyCollectionChangedEventHandler CollectionChanged

Implements: INotifyCollectionChanged.CollectionChanged

Occurs when an owned item's Value setter processes a non-equal value. Conversion failures can still raise this event without changing the stored value.

C#
public event PropertyStoreItemValueChangedEventHandler ItemValueChanged

Occurs when a property of the store or one of its owned items changes.

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged