Class ContextChoiceItemCollection
Represents a class that contains the collection of context choice items.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Edit.Utils
Assembly: Syncfusion.Edit.Windows.dll
Syntax
public class ContextChoiceItemCollection : CollectionBase, IList, ICollection, IEnumerable
Constructors
ContextChoiceItemCollection()
Initializes a new instance of the ContextChoiceItemCollection class.
Declaration
public ContextChoiceItemCollection()
Properties
Item[Int32]
Gets the context choice item by ID.
Declaration
public IContextChoiceItem this[int id] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id |
Property Value
Type |
---|
IContextChoiceItem |
Methods
Add(String)
Creates new context choice item and adds it to collection.
Declaration
public IContextChoiceItem Add(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text of the item. |
Returns
Type | Description |
---|---|
IContextChoiceItem | Newly created context choice item. |
Add(String, INamedImage)
Creates new context choice item and adds it to collection.
Declaration
public IContextChoiceItem Add(string text, INamedImage image)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text of the item. |
INamedImage | image | Image of the item. |
Returns
Type | Description |
---|---|
IContextChoiceItem | Newly created context choice item. |
Add(String, String)
Creates new context choice item and adds it to collection.
Declaration
public IContextChoiceItem Add(string text, string tooltip)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text of the item. |
System.String | tooltip | Tooltip of the item. |
Returns
Type | Description |
---|---|
IContextChoiceItem | Newly created context choice item. |
Add(String, String, INamedImage)
Creates new context choice item and adds it to collection.
Declaration
public IContextChoiceItem Add(string text, string tooltip, INamedImage image)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text of the item. |
System.String | tooltip | Tooltip of the item. |
INamedImage | image | Image of the item. |
Returns
Type | Description |
---|---|
IContextChoiceItem | Newly created context choice item. |
Add(String, String, Color, INamedImage)
Creates new context choice item and adds it to collection.
Declaration
public IContextChoiceItem Add(string text, string tooltip, Color colorText, INamedImage image)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text of the item. |
System.String | tooltip | Tooltip of the item. |
System.Drawing.Color | colorText | Color of the item's text. |
INamedImage | image | Image of the item. |
Returns
Type | Description |
---|---|
IContextChoiceItem | Newly created context choice item. |
Add(String, String, Color, Color, INamedImage)
Creates new context choice item and adds it to collection.
Declaration
public IContextChoiceItem Add(string text, string tooltip, Color colorText, Color colorBackground, INamedImage image)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | Text of the item. |
System.String | tooltip | Tooltip of the item. |
System.Drawing.Color | colorText | Color of the item's text. |
System.Drawing.Color | colorBackground | Color of the item's background. |
INamedImage | image | Image of the item. |
Returns
Type | Description |
---|---|
IContextChoiceItem | Newly created context choice item. |
OnClearComplete()
Clears items hash.
Declaration
protected override void OnClearComplete()
Overrides
OnInsertComplete(Int32, Object)
Adds item to the hash.
Declaration
protected override void OnInsertComplete(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which to insert value. |
System.Object | value | The new value of the element at index. |
Overrides
OnRemoveComplete(Int32, Object)
Removes item from the hash.
Declaration
protected override void OnRemoveComplete(int index, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which value can be found. |
System.Object | value | The value of the element to remove from index. |
Overrides
OnSetComplete(Int32, Object, Object)
Removes old item from the hash and adds new item to the hash.
Declaration
protected override void OnSetComplete(int index, object oldValue, object newValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which oldValue can be found. |
System.Object | oldValue | The value to replace with newValue. |
System.Object | newValue | The new value of the element at index. |
Overrides
Remove(IContextChoiceItem)
Removes item from collection.
Declaration
public void Remove(IContextChoiceItem item)
Parameters
Type | Name | Description |
---|---|---|
IContextChoiceItem | item | Item to remove. |
Events
CollectionChanged
Raised when the list of items was changed.
Declaration
public event EventHandler CollectionChanged
Event Type
Type |
---|
System.EventHandler |