Table of Contents

Interface IPropertyGridChoices

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Choices used in PropertyGrid items for enum and flags properties.

public interface IPropertyGridChoices

Properties

Count

Gets the number of elements actually contained in the IPropertyGridChoices.

HasBitmaps

Gets whether bitmaps where specified for items.

HasCustomBgColors

Gets whether background colors where specified for items.

HasCustomFgColors

Gets whether foreground colors where specified for items.

HasCustomFonts

Gets whether fonts where specified for items.

IsNullable

Gets whether this instance is obtained from NullableChoices.

NullableChoices

Gets copy of this instance with additional empty element.

NullableValue

Gets or sets "nullable" value which is changed to null when is set back to object property. By default it is MaxValue.

Methods

Add(object, ImageSet?)

Adds new item.

Add(string, int, ImageSet?)

Adds new item.

Add(string, out int)

Adds new item with autogenerated value (id).

Add(string, object, ImageSet?)

Adds new item.

AddRange(IPropertyGridChoices)

Adds the elements of the IPropertyGridChoices to the end.

AddRange(IEnumerable<object>)

Adds the elements of the specified collection to the end.

AddRange(IEnumerable<string>)

Adds the elements of the specified collection to the end.

Clear()

Delete all choices.

GetBgColor(int)

Gets item background color.

GetFgColor(int)

Gets item foreground color.

GetLabel(int)

Returns label of item at specified index.

GetLabelFromValue(int)

Searches for the specified item by its value and returns title of the item.

GetLabelIndex(string)

Returns index of item with given title.

GetValue(int)

Returns value of item at specified index.

GetValueFromLabel(string)

Searches for the specified item by its title and returns value (id) of the item.

GetValueIndex(int)

Returns index of item with given value (id).

Insert(int, string, int, ImageSet?)

Inserts a single item.

IsOk()

Returns false if this is a constant empty set of choices, which should not be modified.

RemoveAt(int, int)

Removes items starting at specified index.

RemoveValue<T>(T)

Removes specified enum value from the list of choices.

SetBgColor(int, Color)

Sets item background color.

SetBitmap(int, ImageSet?)

Sets item bitmap.

SetFgColor(int, Color)

Sets item foreground color.

SetLabel(int, string)

Sets item label.

SetLabelForValue(int, string)

Sets item title for the given item value.

SetLabelForValue<T>(T, string)

Sets item title for the given enum value.