Share via


IElementFactory Interfaccia

Definizione

Supporta la creazione e il riciclo degli oggetti UIElement .

public interface class IElementFactory
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1979365959, 11506, 21678, 145, 230, 5, 129, 85, 111, 221, 170)]
struct IElementFactory
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.Guid(1979365959, 11506, 21678, 145, 230, 5, 129, 85, 111, 221, 170)]
public interface IElementFactory
Public Interface IElementFactory
Derivato
Attributi

Commenti

Due implementazioni concrete di questa interfaccia sono:

  1. DataTemplate e
  2. DataTemplateSelector

Il metodo GetElement viene usato per recuperare un'istanza valida di un UIElement. Il metodo RecycleElement viene usato per riciclare gli elementi.

Metodi

GetElement(ElementFactoryGetArgs)

Ottiene un oggetto UIElement .

RecycleElement(ElementFactoryRecycleArgs)

Ricicla un UIElement recuperato in precedenza usando GetElement.

Si applica a

Vedi anche