共用方式為


WebPart.TitleIconImageUrl property

取得或設定用來代表其本身的標題列中的 [網頁組件圖像的 URL。

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

Syntax

'宣告
<WebPartStorageAttribute(Storage.None)> _
Public Overrides Property TitleIconImageUrl As String
    Get
    Set
'用途
Dim instance As WebPart
Dim value As String

value = instance.TitleIconImageUrl

instance.TitleIconImageUrl = value
[WebPartStorageAttribute(Storage.None)]
public override string TitleIconImageUrl { get; set; }

Property value

Type: System.String
含有 URL string 。預設值為String.Empty。

Implements

IWebPart.TitleIconImageUrl

備註

TitleIconImageUrl屬性提供一種方式,以小型圖像網頁組件控制項的標題列。Thematic 的一致性,應用程式開發人員通常請此圖示代表網頁組件控制項 ( CatalogIconImageUrl屬性中所參照的影像) 的目錄中控制項的圖像類似。

以程式設計方式在程式碼中的控制項或宣告式中的網頁組件控制項說明檔 (.webpart) 標記,您可以設定屬性的值。

Examples

The following example shows how to set the TitleIconImageUrl property declaratively in a Web Part control description file. This example uses the Web Part created in Walkthrough: Creating a Basic SharePoint Web Part.

<?xml version="1.0" encoding="utf-8" ?> 
  <webParts>
     <webPart xmlns="https://schemas.microsoft.com/WebPart/v3">
       <metaData>
         <type name="MyWebParts.SimpleWebPart, Version=1.0.0.0, Culture=neutral,
         PublicKeyToken=PublicKeyToken" /> 
         <importErrorMessage>Cannot import this Web 
         Part.</importErrorMessage> 
       </metaData>
       <data>
         <properties>
           <property name="Title" type="string">My Simple Web Part</property>
           <property name="Description" type="string">A simple Web Part</property>
            <property name= "TitleIconImageUrl" type="string">/_layouts/images/mscntvwl.gif</property>
         </properties>
       </data>
     </webPart>
   </webParts>

請參閱

參照

WebPart class

WebPart members

Microsoft.SharePoint.WebPartPages namespace