共用方式為


WebPart.Height property

取得或設定網頁組件網頁組件頁面上的固定的高度。

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

Syntax

'宣告
<PersonalizableAttribute> _
<WebPartStorageAttribute(Storage := Storage.Personal)> _
Public Property Height As String
    Get
    Set
'用途
Dim instance As WebPart
Dim value As String

value = instance.Height

instance.Height = value
[PersonalizableAttribute]
[WebPartStorageAttribute(Storage = Storage.Personal)]
public string Height { get; set; }

Property value

Type: System.String
指定網頁組件的固定的高度string值。可以使用 CSS 中允許任何高度值。預設值為String.Empty。

備註

使用這個屬性來限制在網頁組件] 頁面上的網頁組件的高度。此屬性未設定,或如果它設定為Empty,則 [網頁組件是否允許以擴充要為大做為其內容包含該區域的限制內。

string的值是度量的數字,後面接著表示,例如 50px 50 個像素為單位的雙字元縮寫。會不顯示任何度量單位,如果數字會預設為像素為單位。支援的度量單位:

  • cm (公分為單位)

  • (英吋為單位)

  • 公釐 (公釐)

  • pc (pica 為單位)

  • pt (點)

  • 像素 (像素為單位)

此屬性可以由個別使用者個人化。其WebPartStorageAttribute值為Storage.Personal,這會指定的屬性可以儲存每個使用者為基礎。僅使用正確的個人化網頁組件頁面的使用者可以設定這個屬性。以程式設計方式設定,或者它可以設定透過 [網頁組件] 工作窗格,在個人檢視中的 Web 型使用者介面中,或使用SharePoint Foundation– 相容的 HTML 編輯器,例如SharePoint Designer。

請參閱

參照

WebPart class

WebPart members

Microsoft.SharePoint.WebPartPages namespace