CollectionView.NewItemPlaceholder 屬性

定義

取得物件,這個物件在集合中代表新的項目。

public:
 static property System::Object ^ NewItemPlaceholder { System::Object ^ get(); };
public static object NewItemPlaceholder { get; }
static member NewItemPlaceholder : obj
Public Shared ReadOnly Property NewItemPlaceholder As Object

屬性值

在集合中代表新項目的物件。

備註

CollectionView當 實作 IEditableCollectionView 的 設定為 NewItemPlaceholderPositionAtBeginningAtEnd 時,會將 NewItemPlaceholder 新增至 集合。 一 NewItemPlaceholder 律會出現在集合中;它不會參與群組、排序或篩選。

CurrentItem不可以是 NewItemPlaceholder 。 執行相對導覽的方法,例如 MoveCurrentToNext ,會略過 NewItemPlaceholderMoveCurrentToFirst和 分別將 if NewItemPlaceholderPosition 設定為 AtBeginningAtEnd ,並 MoveCurrentToLast 略過 NewItemPlaceholder 。 執行絕對導覽的方法,例如 MoveCurrentToPosition ,如果 NewItemPlaceholder 會是 CurrentItem ,則不會執行任何動作。

適用於