Custom ToolTip Style

Here is a Template to modify the Tooltip’s look and feel:


<Style TargetType="{x:Type ToolTip}">
 <Setter Property="SnapsToDevicePixels" Value="True"/>
 <Setter Property="Template">
 <Setter.Value>
   <ControlTemplate TargetType="{x:Type ToolTip}">
     <Border BorderBrush="#111111"
         BorderThickness="1"
         SnapsToDevicePixels="True">
       <Border Width="Auto" Height="Auto"
           Name="windowFrame"
           BorderBrush="#999999"
           BorderThickness="1"
           SnapsToDevicePixels="True"
           CornerRadius="0"
           Background="#525252"
           TextBlock.Foreground="White"
           TextBlock.FontFamily="Verdana"
           TextBlock.FontSize="11"
           Margin="0" Padding="3">
         <ContentPresenter />
       </Border>
     </Border>
   </ControlTemplate>
 </Setter.Value>
 </Setter>
</Style>
 

A preview of the Tooltip is given below:
CustomToolTip

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s