设定该指定元素的 KeyTip 附加属性的值。
命名空间:  Microsoft.Windows.Controls
程序集:  RibbonControlsLibrary(在 RibbonControlsLibrary.dll 中)
语法
声明
Public Shared Sub SetKeyTip ( _
    element As DependencyObject, _
    value As String _
)
public static void SetKeyTip(
    DependencyObject element,
    string value
)
public:
static void SetKeyTip(
    DependencyObject^ element, 
    String^ value
)
static member SetKeyTip : 
        element:DependencyObject * 
        value:string -> unit 
public static function SetKeyTip(
    element : DependencyObject, 
    value : String
)
参数
- element
 类型:System.Windows.DependencyObject
 将附加属性写入到的对象。
- value
 类型:System.String
 要设置的值。
异常
| 异常 | 条件 | 
|---|---|
| ArgumentNullException | 指定的 element 为 nullnull 引用(在 Visual Basic 中为 Nothing)。 | 
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。