共用方式為


RequiresContextItemAttribute 建構函式

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

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

語法

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

參數

  • contextItemType
    型別:System.Type
    所需的內容型別。

備註

這個屬性表示類別必須仰賴指定的內容,而且直到設定內容中的值之前,類別都不會具現化。

注意事項注意事項

所有的內容都有預設值,但是啟動機制必須透過外部實體將值送入內容中。

.NET Framework 安全性

請參閱

參考

RequiresContextItemAttribute 類別

Microsoft.Windows.Design 命名空間

RequiresServiceAttribute

UsesItemPolicyAttribute

FeatureProvider

FeatureConnector<TFeatureProviderType>

其他資源

功能提供者和功能連接器

了解 WPF 設計工具擴充性