ContextItemManager.GetValue 方法 (Type)

在派生类中重写时,返回所请求的项类型的实例。

命名空间:  Microsoft.Windows.Design
程序集:  Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)

语法

声明
Public MustOverride Function GetValue ( _
    itemType As Type _
) As ContextItem
public abstract ContextItem GetValue(
    Type itemType
)
public:
virtual ContextItem^ GetValue(
    Type^ itemType
) abstract
abstract GetValue : 
        itemType:Type -> ContextItem 
public abstract function GetValue(
    itemType : Type
) : ContextItem

参数

  • itemType
    类型:System.Type
    要返回的项的类型。

返回值

类型:Microsoft.Windows.Design.ContextItem
所请求的类型的上下文项。如果在此类型的上下文中没有任何项,则将创建一个默认项。

异常

异常 条件
ArgumentNullException

itemType 为 nullnull 引用(在 Visual Basic 中为 Nothing)。

.NET Framework 安全性

请参见

参考

ContextItemManager 类

GetValue 重载

Microsoft.Windows.Design 命名空间

ContextItem

SubscribeContextCallback<TContextItemType>

ServiceManager

FeatureManager

其他资源

编辑上下文体系结构

了解 WPF 设计器扩展性