ContextItemManager.GetValue<TItemType> 方法

返回所请求的项类型的实例。

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

语法

声明
Public Function GetValue(Of TItemType As ContextItem) As TItemType
public TItemType GetValue<TItemType>()
where TItemType : ContextItem
public:
generic<typename TItemType>
where TItemType : ContextItem
TItemType GetValue()
member GetValue : unit -> 'TItemType  when 'TItemType : ContextItem
JScript 不支持泛型类型或方法。

类型参数

  • TItemType

返回值

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

.NET Framework 安全性

请参见

参考

ContextItemManager 类

GetValue 重载

Microsoft.Windows.Design 命名空间

ContextItem

SubscribeContextCallback<TContextItemType>

ServiceManager

FeatureManager

其他资源

编辑上下文体系结构

了解 WPF 设计器扩展性