ToolTipService.GetHorizontalOffset(DependencyObject) Метод

Определение

Получает значение присоединенного свойства HorizontalOffset для объекта.

public:
 static double GetHorizontalOffset(System::Windows::DependencyObject ^ element);
[System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))]
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static double GetHorizontalOffset (System.Windows.DependencyObject element);
[<System.ComponentModel.TypeConverter(typeof(System.Windows.LengthConverter))>]
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetHorizontalOffset : System.Windows.DependencyObject -> double
Public Shared Function GetHorizontalOffset (element As DependencyObject) As Double

Параметры

element
DependencyObject

Объект, из которого считывается значение свойства.

Возвращаемое значение

Значение свойства объекта HorizontalOffset.

Атрибуты

Примеры

В следующем примере показано, как получить значение присоединенного ToolTipService.HorizontalOffset свойства. Метод FindName находит объект с именем ellipse2, который является объектом Ellipse.

double myDouble = ToolTipService.GetHorizontalOffset(
 (DependencyObject)FindName("ellipse2"));
Dim myDouble As Double = ToolTipService.GetHorizontalOffset(CType(FindName("ellipse2"), DependencyObject))

Применяется к

См. также раздел