How to use a tooltip in WPF

The following XAML code adds a tooltip to a TextBox control. Using the same approach, you can apply tooltips to any control in WPF.

 <TextBox HorizontalAlignment="Left">ToolTip with non-text content
<TextBox.ToolTip>
<ToolTip>
<DockPanel Width="50" Height="70">
<Image Source="data\flower.jpg"/>
<TextBlock>Useful information goes here.</TextBlock>
</DockPanel>
</ToolTip>
</TextBox.ToolTip>
</TextBox>