CatalogPart.GetAvailableWebPartDescriptions 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回目錄中可用 WebPart 控制項的描述集合。
public:
abstract System::Web::UI::WebControls::WebParts::WebPartDescriptionCollection ^ GetAvailableWebPartDescriptions();
public abstract System.Web.UI.WebControls.WebParts.WebPartDescriptionCollection GetAvailableWebPartDescriptions ();
abstract member GetAvailableWebPartDescriptions : unit -> System.Web.UI.WebControls.WebParts.WebPartDescriptionCollection
Public MustOverride Function GetAvailableWebPartDescriptions () As WebPartDescriptionCollection
傳回
WebPartDescriptionCollection,包含目錄中每一個控制項的 WebPartDescription。
備註
方法會 GetAvailableWebPartDescriptions 傳回目錄中每個控制項的描述資訊。 WebPartDescription物件是輕量型物件,其中包含控制項的基本 WebPart 資訊,包括其識別碼、控制項的物件參考,以及繼承自基 Part 類之數個重要屬性的值,例如 Title 和 Description 。
方法 GetAvailableWebPartDescriptions 可改善效能。 建立目錄時,它需要一些其包含之控制項的相關資訊,包括標題、描述、圖示 (如果存在) ,以及識別碼。 呼叫端可以使用 GetAvailableWebPartDescriptions 方法,而不需要建立每個控制項的實例來取得這項資訊,這只會傳回每個控制項的描述資訊。
給實施者的注意事項
方法是 GetAvailableWebPartDescriptions() 抽象的,因此必須由衍生控制項 CatalogPart 實作。 這個方法是由包含 CatalogPart 控制項的區域所呼叫,以及在轉譯區域內容 CatalogZoneBase 時由相關聯的 CatalogPartChrome 物件呼叫。