ActionEventArgs.Properties 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取已针对智能标记实现的所有属性。 此类型或成员只适合在 2007 Microsoft Office system 项目中使用。 Office 2010 中已弃用智能标记。。
public Microsoft.Office.Interop.SmartTag.ISmartTagProperties Properties { get; }
属性值
- Microsoft.Office.Interop.SmartTag.ISmartTagProperties
已为智能标记实现的所有属性。
示例
下面的代码示例演示事件的处理程序 Click 。 事件处理程序使用 Properties 属性从智能标记属性的键控集合中获取属性值。 此代码示例是为接口提供的更大示例的一部分 SmartTag 。 此示例假设已在 "添加引用" 对话框的 " .net " 选项卡中添加对智能标记的引用。
此示例适用于文档级自定义项。
// This action displays the property value for the term.
private void Action1_Click(object sender,
Microsoft.Office.Tools.Excel.ActionEventArgs e)
{
ISmartTagProperties propertyBag = e.Properties;
string key = "Key1";
MessageBox.Show("The corresponding value of " + key +
" is: " + propertyBag.get_Read(key));
}
' This action displays the property value for the term.
Private Sub Action1_Click(ByVal sender As Object,
ByVal e As Microsoft.Office.Tools.Excel.ActionEventArgs) Handles Action1.Click
Dim propertyBag As ISmartTagProperties = e.Properties
Dim key As String = "Key1"
MessageBox.Show("The corresponding value of " & key & " is: " &
propertyBag.Read(key))
End Sub
注解
ISmartTagPropertiesMicrosoft Office 智能标记软件开发工具包(SDK)中提供了接口。 若要在代码中使用此接口,请在 "添加引用" 对话框的 " .net " 选项卡中添加对智能标记的引用。