語言

IElementFactory 介面

定義

支援建立與回收 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
衍生
屬性

備註

此介面有兩種具體實作:

  1. DataTemplate,以及
  2. DataTemplateSelector

GetElement 方法用於檢索有效的 UIElement 實例。 RecycleElement 方法用於回收元素。

方法

名稱 Description
GetElement(ElementFactoryGetArgs)

會拿到 一個 UIElement 物件。

RecycleElement(ElementFactoryRecycleArgs)

回收先前使用 GetElement 取得的 UIElement。

適用於

另請參閱