共用方式為


ModelItemCollection.Insert 方法 (Int32, Object)

在衍生類別中覆寫時,將項目插入指定的位置。

命名空間:  Microsoft.Windows.Design.Model
組件:  Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)

語法

'宣告
Public MustOverride Function Insert ( _
    index As Integer, _
    value As Object _
) As ModelItem
public abstract ModelItem Insert(
    int index,
    Object value
)
public:
virtual ModelItem^ Insert(
    int index, 
    Object^ value
) abstract
abstract Insert : 
        index:int * 
        value:Object -> ModelItem 
public abstract function Insert(
    index : int, 
    value : Object
) : ModelItem

參數

  • index
    型別:System.Int32
    要插入之項目的索引。
  • value
    型別:System.Object
    要在指定的索引上插入的物件。

傳回值

型別:Microsoft.Windows.Design.Model.ModelItem
表示值的 ModelItem

備註

如果 index 等於 Count,這個方法會在結尾插入項目。 如果 index 為零,這個方法會在開頭插入項目。

若要移動項目,請使用 Move 方法。

.NET Framework 安全性

請參閱

參考

ModelItemCollection 類別

Insert 多載

Microsoft.Windows.Design.Model 命名空間

其他資源

WPF 設計工具擴充性架構