1

Possible Duplicate:
How to set tooltip for a ListviewItem

I am converting a Windows Forms application to WPF. I am very new to WPF.

In my application I have a listview. When the user moves the mouse to the items present in the listview I want to show the tooltip text for the highlighted item.

How to do this in WPF?

Community
  • 1
  • 1
user642378
  • 167
  • 6
  • 12
  • What have you tried? See [How to set tooltip for a ListviewItem](http://stackoverflow.com/questions/2730931/how-to-set-tooltip-for-a-listviewitem) and [Listview Trouble - Tooltip Needed](http://stackoverflow.com/questions/4184427/listview-trouble-tooltip-needed). – CodeCaster Jan 31 '13 at 09:58

1 Answers1

5

You can do this via binding:

        <ListView.ItemContainerStyle>
            <Style TargetType="{x:Type ListViewItem}">
                <Setter Property="ToolTip" Value="{Binding Path=Content}"/>
            </Style>
        </ListView.ItemContainerStyle>
Florian Gl
  • 5,984
  • 2
  • 17
  • 30