Share via


ToolTipService.GetShowDuration(DependencyObject) 方法

定义

获取对象的 ShowDuration 附加属性的值。

public:
 static int GetShowDuration(System::Windows::DependencyObject ^ element);
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static int GetShowDuration (System.Windows.DependencyObject element);
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetShowDuration : System.Windows.DependencyObject -> int
Public Shared Function GetShowDuration (element As DependencyObject) As Integer

参数

element
DependencyObject

从中读取属性值的对象。

返回

对象的 ShowDuration 属性值。

属性

示例

以下示例演示如何获取附加属性的值 ToolTipService.ShowDuration 。 方法 FindName 查找名为 ellipse2的对象,即 Ellipse

myInt = ToolTipService.GetShowDuration(
              (DependencyObject)FindName("ellipse2"));
myInt = ToolTipService.GetShowDuration(CType(FindName("ellipse2"), DependencyObject))

适用于

另请参阅