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方法可用來回收元素。

方法

GetElement(ElementFactoryGetArgs)

取得 UIElement 物件。

RecycleElement(ElementFactoryRecycleArgs)

回收先前使用 GetElement 擷取的 UIElement

適用於

另請參閱