Skip to content

Latest commit

 

History

History
35 lines (20 loc) · 859 Bytes

itemssourceview_keyfromindex_425681605.md

File metadata and controls

35 lines (20 loc) · 859 Bytes
-api-id -api-type
M:Microsoft.UI.Xaml.Controls.ItemsSourceView.KeyFromIndex(System.Int32)
winrt method

Microsoft.UI.Xaml.Controls.ItemsSourceView.KeyFromIndex(System.Int32)

-description

Retrieves the unique identifier (key) for the item at the specified index.

-parameters

-param index

The index of the item to get the key for.

-returns

The unique identifier (key) for the item at the specified index.

-remarks

Check that the HasKeyIndexMapping property is true before calling this method. If the data source does not support unique IDs (key values), this method causes a NotImplementedException.

Use the Count property to make sure you are passing a valid index.

-see-also

-examples