Live Chat Icon For mobile
Live Chat Icon

How do I use the TooltipService class?

Platform: WPF| Category: ToolTip

The following example shows how to use the ‘ToolTipService’ properties to specify the position of a tooltip among other things. This also shows how the tooltip look and feel can be customized with any content.

[XAML]

    <Ellipse Height='25' Width='50' 
         Fill='Gray' 
         HorizontalAlignment='Left'
         ToolTipService.InitialShowDelay='1000'
         ToolTipService.ShowDuration='7000'
         ToolTipService.BetweenShowDelay='2000'
         ToolTipService.Placement='Right' 
         ToolTipService.PlacementRectangle='50,0,0,0'
         ToolTipService.HorizontalOffset='10' 
         ToolTipService.VerticalOffset='20'
         ToolTipService.HasDropShadow='false'
         ToolTipService.ShowOnDisabled='true' 
         ToolTipService.IsEnabled='true'
         ToolTipOpening='whenToolTipOpens'
         ToolTipClosing='whenToolTipCloses'
         >
  <Ellipse.ToolTip>
    <BulletDecorator>
      <BulletDecorator.Bullet>
        <Ellipse Height='10' Width='20' Fill='Blue'/>
      </BulletDecorator.Bullet>
      <TextBlock>Uses the ToolTipService class</TextBlock>
    </BulletDecorator>
  </Ellipse.ToolTip>
</Ellipse>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.