ToolTipService.HasDropShadow Attached Property

Gets or sets whether the tooltip displays a drop shadow effect.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in PresentationFramework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

See ToolTipService.GetHasDropShadow, ToolTipService.SetHasDropShadow
See ToolTipService.GetHasDropShadow, ToolTipService.SetHasDropShadow
See ToolTipService.GetHasDropShadow, ToolTipService.SetHasDropShadow
<object ToolTipService.HasDropShadow="bool" .../>

Property Value

true if a drop shadow effect appears with the tooltip; otherwise, false. The default value is false.

Identifier field

HasDropShadowProperty

Metadata properties set to true

None

The default style for a tooltip control adds a drop shadow effect. If you do not explicitly set the HasDropShadow property, the property value is false until the first time the tooltip is displayed. The default tooltip style is applied when a tooltip is displayed and the style sets the HasDropShadow property to true.

If the tooltip is a System.Windows.Controls.ToolTip object and both the ToolTip.HasDropShadow property and the ToolTipService.HasDropShadow property are specified, the value of the ToolTipService.HasDropShadow property is used.

For information about how to get or set this property in code, see the GetHasDropShadow and SetHasDropShadow methods.

The following example shows how to set the HasDropShadow attached property of the ToolTipService class. For the complete sample, see ToolTipService Sample.

    <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>


Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Show: