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))

適用於

另請參閱