Search This Blog

Monday, November 11, 2013

ToolTip WPF Example

WPF > Controls > ContentControl > ToolTip

Tooltip is a small pop-up window that is displayed when a user move the mouse pointer over an element.
The content of a tooltip can contain text, images, shapes, etc.


Example:

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" Background="#FFF3EEEE">

  <TextBox HorizontalAlignment="Left" Height="29" VerticalAlignment="Top">TextBox with ToolTip
        <TextBox.ToolTip>
            <ToolTip>
                <DockPanel >
                    <TextBlock Text="ToolTip Information"/>
                </DockPanel>
            </ToolTip>
        </TextBox.ToolTip>
    </TextBox>
</Window>