DataTemplateSelector.GetElement(ElementFactoryGetArgs) DataTemplateSelector.GetElement(ElementFactoryGetArgs) DataTemplateSelector.GetElement(ElementFactoryGetArgs) DataTemplateSelector.GetElement(ElementFactoryGetArgs) Method

Definition

Creates or retrieves an existing instance of the UIElement object declared in the DataTemplate returned by SelectTemplate.

public : UIElement GetElement(ElementFactoryGetArgs args)
UIElement GetElement(ElementFactoryGetArgs args) const;
public UIElement GetElement(ElementFactoryGetArgs args)
Public Function GetElement(args As ElementFactoryGetArgs) As UIElement

Parameters

Returns

An instance of the root UIElement declared in the selected DataTemplate or, null if the root of the selected DataTemplate is not a UIElement.

Additional features and requirements

Device family
Windows 10, version 1809 (introduced v10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v7)

Remarks

For more info, see the remarks for the DataTemplate.GetElement method.

See also

  • T:Windows.UI.Xaml.IElementFactory * DataTemplate * M:Windows.UI.Xaml.DataTemplate.GetElement(Windows.UI.Xaml.ElementFactoryGetArgs) * M:Windows.UI.Xaml.DataTemplate.RecycleElement(Windows.UI.Xaml.ElementFactoryRecycleArgs) * DataTemplateSelector * M:Windows.UI.Xaml.Controls.DataTemplateSelector.GetElement(Windows.UI.Xaml.ElementFactoryGetArgs) * M:Windows.UI.Xaml.Controls.DataTemplateSelector.RecycleElement(Windows.UI.Xaml.ElementFactoryRecycleArgs)