共用方式為


WebPartMobileAdapter.OnInitForMobile method

取代當控制項是在WebPartMobilePage改寫控制項的OnInit(EventArgs)方法。

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Protected Overridable Sub OnInitForMobile ( _
    e As EventArgs _
)
'用途
Dim e As EventArgs

Me.OnInitForMobile(e)
protected virtual void OnInitForMobile(
    EventArgs e
)

參數

備註

預設實作只呼叫基底OnInit(EventArgs)方法。

從您自己的程式碼不呼叫這個方法。Microsoft SharePoint Foundation行動 adaption framework 會呼叫它的Init事件處理的一部分。

Notes to inheritors

當您需要額外的初始化邏輯,以呈現行動裝置上的控制項時,請覆寫這個方法。

重要

覆寫必須一律呼叫基底配接器類別的OnInit(EventArgs)方法,以確保改寫為控制項的Init事件會引發。

請參閱

參照

WebPartMobileAdapter class

WebPartMobileAdapter members

Microsoft.SharePoint.WebPartPages namespace