共用方式為


RequiresServiceAttribute 建構函式

初始化 RequiresServiceAttribute 類別的新執行個體。

命名空間:  Microsoft.Windows.Design
組件:  Microsoft.Windows.Design.Extensibility (在 Microsoft.Windows.Design.Extensibility.dll 中)

語法

'宣告
Public Sub New ( _
    serviceType As Type _
)
public RequiresServiceAttribute(
    Type serviceType
)
public:
RequiresServiceAttribute(
    Type^ serviceType
)
new : 
        serviceType:Type -> RequiresServiceAttribute
public function RequiresServiceAttribute(
    serviceType : Type
)

參數

  • serviceType
    型別:System.Type
    類別所需的服務型別。

備註

這個屬性表示類別必須仰賴指定的服務,而且直到可以使用服務之前,類別都不會具現化。

.NET Framework 安全性

請參閱

參考

RequiresServiceAttribute 類別

Microsoft.Windows.Design 命名空間

RequiresContextItemAttribute

UsesItemPolicyAttribute

PrimarySelectionPolicy

FeatureProvider

其他資源

功能提供者和功能連接器

了解 WPF 設計工具擴充性