ToolTip.PlacementTarget property
Gets or sets the visual element or control that the tool tip should be positioned in relation to when opened by the ToolTipService.
Syntax
public: property UIElement^ PlacementTarget { UIElement^ get(); void set (UIElement^ value); }
<ToolTip PlacementTarget="{Binding ElementName=placementTargetName}"/>
XAML Values
- placementTargetName
-
The Name or x:Name of the UI element that serves as the placement target. This syntax assumes that the working data context contains the named element. For more information, see ElementName.
Property value
Type: UIElement
The visual element or control that the tool tip is positioned in relation to when opened by the ToolTipService. The default is null.
Remarks
If there is no explicit PlacementTarget, the placement target for a ToolTip is the element that specifies the ToolTip as the value for its TooltipService.ToolTip attached property value, and any Placement value applies to that target. The placement target determination is based on visual tree composition, and whether to display a tooltip at all is parallel to the target's hit test characteristics. A Control instance where IsEnabled is false will not display a ToolTip.
Placement and PlacementTarget are usually left as the defaults. The scenario for specifying either or both of these properties is if you are trying to avoid a case where the tooltip obscures the content it is referring to while the tooltip is displayed.
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 3/12/2013
