ItemsPanelTemplate 類別

定義

指定 ItemsPresenter 針對 ItemsControl 專案配置所建立的面板。

public ref class ItemsPanelTemplate sealed : FrameworkTemplate
/// [Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ItemsPanelTemplate final : FrameworkTemplate
[Windows.Foundation.Metadata.Activatable(65536, "Microsoft.UI.Xaml.WinUIContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ItemsPanelTemplate : FrameworkTemplate
Public NotInheritable Class ItemsPanelTemplate
Inherits FrameworkTemplate
<ItemsPanelTemplate ...>
  templateRootElement
</ItemsPanelTemplate>
繼承
Object Platform::Object IInspectable DependencyObject FrameworkTemplate ItemsPanelTemplate
屬性

備註

ItemsPanelTemplate 物件項目應該只包含一個 FrameworkElement 衍生類別,做為專案的根元素。 在大部分情況下,這是 Panel 衍生類別。 展開的範本可作為實現專案的父代,而且通常有多個專案。 因此,ItemsPanelTemplate 之預定根元素的 XAML 內容屬性應該支援集合,如同 Panel.Children 一樣。

重要

GroupStyle.Panel 屬性中針對 ItemsPanelTemplate 宣告之範本的根元素不能是虛擬化面板。 虛擬化面板定義為衍生自 VirtualizingPanel 的任何類型,例如 VirtualizingStackPanel 類別。

建構函式

ItemsPanelTemplate()

初始化 ItemsPanelTemplate 類別的新實例。

屬性

Dispatcher

一律會在 Windows 應用程式 SDK 應用程式中傳回null。 請改用 DispatcherQueue

(繼承來源 DependencyObject)
DispatcherQueue

DispatcherQueue取得與這個 物件相關聯的 。 DispatcherQueue表示即使程式代碼是由非 UI 線程起始,也可以存取 DependencyObject UI 線程上的 。

(繼承來源 DependencyObject)

方法

ClearValue(DependencyProperty)

清除相依性屬性的本機值。

(繼承來源 DependencyObject)
GetAnimationBaseValue(DependencyProperty)

傳回針對相依性屬性所建立的任何基底值,如果動畫未使用中,則會套用。

(繼承來源 DependencyObject)
GetValue(DependencyProperty)

DependencyObject 傳回相依性屬性的目前有效值。

(繼承來源 DependencyObject)
ReadLocalValue(DependencyProperty)

如果已設定本機值,則傳回相依性屬性的本機值。

(繼承來源 DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

註冊通知函式,以接聽此 DependencyObject 實例上特定 DependencyProperty 的變更。

(繼承來源 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyObject 上設定相依性屬性的本機值。

(繼承來源 DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

取消先前透過呼叫 RegisterPropertyChangedCallback 註冊的變更通知。

(繼承來源 DependencyObject)

適用於

另請參閱