Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 1.16 KB

itemsrepeater_trygetelement_2086043841.md

File metadata and controls

37 lines (21 loc) · 1.16 KB
-api-id -api-type
M:Microsoft.UI.Xaml.Controls.ItemsRepeater.TryGetElement(System.Int32)
winrt method

Microsoft.UI.Xaml.Controls.ItemsRepeater.TryGetElement(System.Int32)

-description

Retrieves the realized UIElement that corresponds to the item at the specified index in the data source.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

-parameters

-param index

The index of the item.

-returns

The UIElement that corresponds to the item at the specified index if the item is realized, or null if the item is not realized.

-remarks

An item is realized when a UIElement has been prepared to display it. Requesting the element for an item that is not realized does not cause it to be realized; instead it is reported as null.

-see-also

GetOrCreateElement, GetElementIndex

-examples