DesignSurface.ServiceContainer 屬性

定義

拿到服務容器。

protected:
 property System::ComponentModel::Design::ServiceContainer ^ ServiceContainer { System::ComponentModel::Design::ServiceContainer ^ get(); };
protected System.ComponentModel.Design.ServiceContainer ServiceContainer { get; }
member this.ServiceContainer : System.ComponentModel.Design.ServiceContainer
Protected ReadOnly Property ServiceContainer As ServiceContainer

屬性值

服務容器,為設計表面內的設計師提供所有服務。

例外狀況

備註

建構時,會 DesignSurface 將預設服務加入此服務容器。 你可以保留預設服務的狀態,或者移除並用自己的服務取代。 預設服務都是需求創建的,因此在建設時新增服務不會損失效能。

適用於