IElementFactory 介面

定義

支援建立和回收 UIElement 物件。

public interface class IElementFactory
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 458752)]
/// [Windows.Foundation.Metadata.Guid(399682960, 4976, 21960, 128, 225, 120, 180, 144, 4, 169, 225)]
struct IElementFactory
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 458752)]
[Windows.Foundation.Metadata.Guid(399682960, 4976, 21960, 128, 225, 120, 180, 144, 4, 169, 225)]
public interface IElementFactory
Public Interface IElementFactory
衍生
屬性

Windows 需求

裝置系列
Windows 10, version 1809 (已於 10.0.17763.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v7.0 引進)

備註

此介面的兩個具體實作如下:

  1. DataTemplate
  2. DataTemplateSelector

GetElement方法可用來擷取UIElement的有效實例。 RecycleElement方法可用來回收元素。

方法

GetElement(ElementFactoryGetArgs)

取得 UIElement 物件。

RecycleElement(ElementFactoryRecycleArgs)

回收先前使用GetElement擷取的UIElement

適用於

另請參閱