ToolTip::PlacementRectangle Property

 

Gets or sets the rectangular area relative to which the ToolTip control is positioned when it opens.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public:
[BindableAttribute(true)]
property Rect PlacementRectangle {
	Rect get();
	void set(Rect value);
}

Property Value

Type: System.Windows::Rect

The Rect structure that defines the rectangle that is used to position the ToolTip control. The default is Empty.

You can position ToolTip by setting the PlacementTarget, PlacementRectangle, Placement, HorizontalOffset, and VerticalOffsetProperty properties. These properties behave the same as they do for a Popup. For more information, see Popup Placement Behavior.

Identifier field

PlacementRectangleProperty

Metadata properties set to true

None

The following example shows how to create and position a ToolTip.

<Ellipse Height="25" Width="50" 
         Fill="Gray" 
         HorizontalAlignment="Left"
         ToolTipService.InitialShowDelay="1000"
         ToolTipService.ShowDuration="7000"
         ToolTipService.BetweenShowDelay="2000">
  <Ellipse.ToolTip>
    <ToolTip Placement="Right" 
             PlacementRectangle="50,0,0,0"
             HorizontalOffset="10" 
             VerticalOffset="20"
             HasDropShadow="false"
             Opened="whenToolTipOpens"
             Closed="whenToolTipCloses"
             >
      <BulletDecorator>
        <BulletDecorator.Bullet>
          <Ellipse Height="10" Width="20" Fill="Blue"/>
        </BulletDecorator.Bullet>
        <TextBlock>Uses the ToolTip Class</TextBlock>
      </BulletDecorator>
    </ToolTip>
  </Ellipse.ToolTip>
</Ellipse>

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: