In This Article

ExpandableCollectionConverter.ListItemPropertyDescriptor Class

Represents a PropertyDescriptor for an item in a list.

protected class ListItemPropertyDescriptor : TypeConverter.SimplePropertyDescriptor, ICollectionItemPropertyDescriptor
Inheritance:
Object Object
Implements:
ICollectionItemPropertyDescriptor

Constructors

ListItemPropertyDescriptor(IList, Int32, Type, Attribute[], Boolean, Boolean)

Initializes a new instance of the ExpandableCollectionConverter.ListItemPropertyDescriptor class.

public ListItemPropertyDescriptor(IList list, int index, Type itemType, Attribute[] attributes, bool isCollectionReadOnly, bool isReadOnly)
Parameter Type Description
list IList

The list associated with the item.

index Int32

The index of the item in the list.

itemType Type

Type of the item.

attributes Attribute[]

An Attribute[] with attributes to associated with the property.

isCollectionReadOnly Boolean

Whether the list is forced to be read-only, and this item cannot be removed from it.

isReadOnly Boolean

if set to true then this property will be read-only.

Properties

CanRemove

Gets a value indicating whether the collection item can be removed.

public virtual bool CanRemove { get; }

Property Value

Boolean:

true if the collection item can be removed; otherwise, false.

Index

Gets the index of the list item associated with this property descriptor.

public int Index { get; }

Property Value

Int32:

The index of the list item associated with this property descriptor.

IsReadOnly

Gets a value indicating whether this property is read-only.

public override bool IsReadOnly { get; }

Property Value

Boolean

List

Gets the list associated with this property descriptor.

public IList List { get; }

Property Value

IList:

The list associated with this property descriptor.

Methods

GetValue(Object)

When overridden in a derived class, gets the current value of the property on a component.

public override object GetValue(object component)
Parameter Type Description
component Object

The component with the property for which to retrieve the value.

Returns

Object:

The value of a property for a given component.

Remove()

Removes this item from the associated collection.

public virtual bool Remove()

Returns

Boolean:

true if the item was removed; otherwise, false.

SetValue(Object, Object)

When overridden in a derived class, sets the value of the component to a different value.

public override void SetValue(object component, object value)
Parameter Type Description
component Object

The component with the property value that is to be set.

value Object

The new value.