ToolTipService.SetPlacementTarget method

Applies to Windows and Windows Phone

Sets the ToolTipService.PlacementTarget XAML attached property value for the specified target element.

Syntax


public static void SetPlacementTarget(
  DependencyObject element, 
  UIElement value
)

Parameters

element

Type: DependencyObject

The target element for the attached property value.

value

Type: UIElement

The visual element that should be the placement target for the tooltip.

Remarks

This method supports the ToolTipService.PlacementTarget attached property usage for Extensible Application Markup Language (XAML). The value for element is not necessarily a ToolTip, it might be an element that owns an inferred tooltip through usage of ToolTipService APIs. You can use the ToolTipService.PlacementTarget attached property to set the placement target to be different than the element that owns the ToolTip for purposes of UI behavior and built-in PointerEntered / PointerExited handling. This enables controls to act like a unit for tooltip display, so that the tooltip from one control does not obscure an important part of a related control when it displays.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

ToolTipService

 

 

Show:
© 2014 Microsoft