This documentation is for the old version. Go to the latest Graphics Mill docs

ListItemCollection.GetItemsByState Method

Gets an array of list items which have the specified state (e.g. checked, or selected).

Namespace: Aurigma.GraphicsMill.WinControls
Assembly: Aurigma.GraphicsMill.WinControls (in Aurigma.GraphicsMill.WinControls.dll)

Syntax

Visual Basic
Public Function GetItemsByState ( _
	itemStateType As StateType, _
	valueToCompare As Boolean, _
	onlyFirst As Boolean _
) As IListItem()
C#
public IListItem[] GetItemsByState(
	StateType itemStateType,
	bool valueToCompare,
	bool onlyFirst
)

Parameters

itemStateType

Type: Aurigma.GraphicsMill.WinControls.StateType

Member of the StateType enumeration specifying the search criteria.
valueToCompare

Type: System.Boolean

A Boolean value which should the state property have to be included into the result array.
onlyFirst

Type: System.Boolean

A Boolean value which specifies whether only the first found item should be returned (true ) or all items which meet itemStateType and valueToCompare arguments requirements (false).

Return Value

Result array of list items that meets specified criterias.

Remarks

This method checks Checked, Focused, or Selected property (depending on the itemStateType argument value) of all items in the collection, and if it equals to valueToCompare argument, an appropriate item is added into the result array. For example, if you want to get all selected items, you should set itemStateType to Selection and valueToCompare to true. If you want to get, say, all unchecked items, use the following values: itemStateType = Check and valueToCompare = false.

See Also

Reference