Share via


CursorButtons.get_Item Method

CursorButtons.get_Item Method

Returns the CursorButton object at the known index in a CursorButtons collection.

Definition

Visual Basic .NET Public Function get_Item( _
ByVal id As Guid _
) As CursorButton
C# public CursorButton get_Item(
Guid id
);
Managed C++ public: CursorButton* get_Item(
Guid *id
);

Parameters

id System.Guid. The GUID identifier of the CursorButton object to return from the collection.

Return Value

Microsoft.Ink.CursorButton. Returns the CursorButton object at the known index in a CursorButtons collection.

Remarks

An error occurs if the index doesn't match any existing member of the CursorButtons collection.

Note: [C#]  Use the CursorButtons collection's indexer as shown in the following example rather than using the CursorButtons collection's get_Item method.

Examples

[C#]

This C# example gets a CursorButton from the Buttons property of a Cursor object for an InkOverlay named theInkOverlay. It assumes that you have previously defined a Guid for the tip switch button called tipSwitchGuid.

CursorButton tipSwitchButton = theInkOverlay.Cursors[0].Buttons[tipSwitchGuid];
                    

[VB.NET]

This Microsoft® Visual Basic® .NET example gets a CursorButton from the Buttons property of a Cursor object for an InkOverlay named theInkOverlay. It assumes that you have previously defined a Guid for the tip switch button called tipSwitchGuid.

Dim tipSwitchButton As CursorButton = theInkOverlay.Cursors(0).Buttons(tipSwitchGuid)
                

See Also