共用方式為


ItemsRepeater.ItemTemplate 屬性

定義

取得或設定用來顯示每個專案的範本。

public:
 property Platform::Object ^ ItemTemplate { Platform::Object ^ get(); void set(Platform::Object ^ value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
IInspectable ItemTemplate();

void ItemTemplate(IInspectable value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
IInspectable ItemTemplate();

void ItemTemplate(IInspectable value);
public object ItemTemplate { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
public object ItemTemplate { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] set; }
var object = itemsRepeater.itemTemplate;
itemsRepeater.itemTemplate = object;
Public Property ItemTemplate As Object

屬性值

Object

Platform::Object

IInspectable

指定數據物件視覺效果的範本。 預設值為 null

屬性
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute

備註

將此屬性設定為 Factory 物件,用來產生指定資料項的 UIElement。 這可以是 DataTemplate、DataTemplateSelector,或由其他機制建立 UIElementFactory 的 IElementFactory 自定義實作。

產生的專案可能會重複使用。 例如,在索引 0 上顯示專案所產生的專案,稍後可能會重複使用,以在索引 100 上顯示專案。

適用於