共用方式為


WebPart.ContainerWidth property

NOTE: This API is now obsolete.

取得值,來設定] 頁面上作者當做網頁組件的方式來提示寬以預期要包含的網頁組件區域。

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

Syntax

'宣告
<ObsoleteAttribute("Use WebPartZone.ContainerWidth instead.")> _
Protected ReadOnly Property ContainerWidth As String
    Get
'用途
Dim value As String

value = Me.ContainerWidth
[ObsoleteAttribute("Use WebPartZone.ContainerWidth instead.")]
protected string ContainerWidth { get; }

Property value

Type: System.String
string指定 CSS 寬度的百分比 (%) 或像素 (像素)。

備註

只有在執行階段有ContainerWidth屬性的值。網頁組件呈現之前,可以變更EffectiveFrameType、 ContainerWidth和Permissions屬性的值。這是因為ZoneID屬性可能已變更,而這會影響這些屬性的值。保證這些屬性都有其最終值,考慮到任何所需的區域變更為呼叫網頁組件RenderWebPart方法的帳戶。

請參閱

參照

WebPart class

WebPart members

Microsoft.SharePoint.WebPartPages namespace