語言

SubMenuStyleCollection.OnInsert(Int32, Object) 方法

定義

在 and Add(SubMenuStyle) methods 之前Insert(Int32, SubMenuStyle)被打電話。

protected:
 override void OnInsert(int index, System::Object ^ value);
protected override void OnInsert(int index, object value);
override this.OnInsert : int * obj -> unit
Protected Overrides Sub OnInsert (index As Integer, value As Object)

參數

index
Int32

應插入的以零為基礎的索引 value 。

value
Object

要插入收藏 SubMenuStyleCollection 的物件。

例外狀況

value 不屬於 SubMenuStyle類型。

備註

OnInsert該方法在 and Add methods 之前Insert被呼叫。 你可以在自訂OnInsert類別中覆寫此SubMenuStyleCollection方法,在物件加入SubMenuStyle集合前執行自訂處理SubMenuStyleCollection。

適用於

另請參閱